Skip to content
Snippets Groups Projects
Commit 50a617dd authored by Hans Fangohr's avatar Hans Fangohr
Browse files

Catch potential user error

- if passed to 'available', this creates a long and not very helpful message
  that lists all branches.
- if we catch it here, we avoid that.
parent b898bf5e
No related branches found
No related tags found
1 merge request!56Catch potential user error
Pipeline #370937 passed
......@@ -1113,6 +1113,14 @@ def main():
get_installer_log_file_path(args.release, args.action, root_dir),
)
# sanity check for common mistakes in command line arguments
if args.release.endswith("/"): # happens easily with autocompletion
logging.error(
f"You provided mpsd-release='{args.release}'. "
"Did you mean '{args.release.rstrip('/')}'?"
)
sys.exit(1)
# Check the command and run related function
if args.action == "remove":
remove_environment(args.release, args.toolchains, root_dir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment