u-root command: add checkArgs function#2642
Merged
rminnich merged 1 commit intou-root:mainfrom Mar 23, 2023
Merged
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #2642 +/- ##
==========================================
+ Coverage 72.25% 74.93% +2.67%
==========================================
Files 354 413 +59
Lines 37332 41661 +4329
==========================================
+ Hits 26974 31217 +4243
- Misses 10358 10444 +86 see 119 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
0f7fa98 to
23e0637
Compare
Member
Author
|
if anyone can tell me why the lint step is failing, I'd be happy to hear it |
23e0637 to
134d448
Compare
There are errors which have confusing diagnostics. A typical one is this u-root -files `which ethtool` -files `which bash` all if ethtool is not installed, this expands to u-root -files -files `which bash` all and a warning that is very confusing: Skipping /usr/bin/bash because it is not a directory This is not even remotely related to the problem. Still worse, this command will create a badly broken initrd! This problem has been known to hold up interns for weeks at a time :-) Add checkArgs, which looks for common problems in os.Args, and is easily expanded. Add a test. Signed-off-by: Ronald G. Minnich <[email protected]>
134d448 to
f45e308
Compare
Member
Author
|
ah it's just go versions. bleah. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are errors which have confusing diagnostics.
A typical one is this
u-root -files
which ethtool-fileswhich bashallif ethtool is not installed, this expands to
u-root -files -files
which bashalland a warning that is very confusing:
Skipping /usr/bin/bash because it is not a directory
This is not even remotely related to the problem.
Still worse, this command will create a badly broken initrd!
This problem has been known to hold up interns for weeks at a time :-)
Add checkArgs, which looks for common problems in os.Args, and is easily expanded. Add a test.