forked from u-root/u-root
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
u-root command: add checkArgs function
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]>
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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