-
Notifications
You must be signed in to change notification settings - Fork 126
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
Handle invalid option in the tmt-reboot
script
#3358
base: main
Are you sure you want to change the base?
Conversation
Fix a minor issues detected by the shell-check.
@@ -18,6 +18,7 @@ while getopts "c:t:e" flag; do | |||
c) command="${OPTARG}";; | |||
t) timeout="${OPTARG}";; | |||
e) efi=False;; | |||
*) exit 1;; |
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.
You may want to put a message there to the user about invalid argument.
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.
This is already handled by getopt
:
tmt-reboot: illegal option -- x
So I guess we don't have to duplicate the error message.
@psss Also, you may want to disable checks on the warnings that you do not plan to fix. Thanks! |
We already exclude certain paths in the github workflow: tmt/.github/workflows/shellcheck.yml Lines 29 to 33 in 938d8bc
Can we do a similar thing for |
Fix a minor issues detected by the shell-check.