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

Handle invalid option in the tmt-reboot script #3358

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

psss
Copy link
Collaborator

@psss psss commented Nov 12, 2024

Fix a minor issues detected by the shell-check.

Fix a minor issues detected by the shell-check.
@psss psss added step | execute Stuff related to the execute step code | trivial A simple patch - a couple of lines, an easy-to-understand change, a typo fix. ci | full test Pull request is ready for the full test execution labels Nov 12, 2024
@@ -18,6 +18,7 @@ while getopts "c:t:e" flag; do
c) command="${OPTARG}";;
t) timeout="${OPTARG}";;
e) efi=False;;
*) exit 1;;
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

@siteshwar
Copy link
Contributor

@psss Also, you may want to disable checks on the warnings that you do not plan to fix. Thanks!

@psss
Copy link
Collaborator Author

psss commented Nov 18, 2024

@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:

exclude-path: |
tests/**
examples/**/test.sh
tmt/steps/execute/scripts/*.sh.j2
tmt/templates/**

Can we do a similar thing for /usr/share/doc/tmt/examples/* for openscanhub jobs?

@psss psss added this to the 1.40 milestone Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci | full test Pull request is ready for the full test execution code | trivial A simple patch - a couple of lines, an easy-to-understand change, a typo fix. step | execute Stuff related to the execute step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants