-
Notifications
You must be signed in to change notification settings - Fork 40
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
Unlock shebang++ #560
Unlock shebang++ #560
Changes from all commits
9299cc6
87ac1e1
ce1562b
fce3b21
a9aab2f
fca4f34
6aa4637
f03f9e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package command | ||
|
||
import ( | ||
"os/exec" | ||
"strings" | ||
|
||
"github.com/pkg/errors" | ||
|
@@ -53,6 +54,12 @@ func (n *pathNormalizer) findProgramInInterpreters(programName string) (programP | |
} | ||
} | ||
|
||
// Default to "cat" | ||
cat, err := exec.LookPath("cat") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adambabik should this be using the new There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can leave it as is. I need to port the |
||
if err == nil { | ||
return cat, nil, nil | ||
} | ||
|
||
return "", nil, errors.Errorf("unable to look up any of interpreters %s", interpreters) | ||
} | ||
|
||
|
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that it is not used. We can keep it for the completeness reason.
The most important for me is to provide more detailed description. What does "known" mean? What guarantees does it give? Maybe given an example how client would use this.
Finally, if you take a look at
config/v1alpha1/config.proto
, we have a way to validate field values in the proto definition. This is a bit tricky and not used anywhere else, so it might be a better idea for a separate PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add an example. The reason why I added
id
(unused) was because I have near-term projects in mind where I need it. I'll be sure to make the description better. Going to skip validation in this PR for now.