Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix template not used for help command #665

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/porter/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:generate packr2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what was missing and causing things to not work properly for binaries not build on dev machines. Thanks for figuring that out! πŸ‘

It can be hard to tell because packr will fallback to the filesystem when the data isn't found in the binary. Because this line was missing, nothing was being built into the binary for the help text. But it was working on dev machines because the files were present locally. πŸ˜†

The other changes in the file aren't necessary and should be reverted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other changes are intentional.
I thought directory name: templates makes sense than helptext because in future we may need to add other templates. So, i refactored that logic

If i am wrong/misunderstood , i can revert if you want

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our preference for pull requests, is it limit them to a single task. In this case the issue is to fix the help text and since the refactoring wasn't necessary for the fix, we prefer to not include it in the same PR.

Later, if we had an issue where we needed to add more templates to cmd/porter, that would be the time to refactor. Right now we don't have anything like that on the backlog though.


package main

import (
Expand Down