diff --git a/mpsd-software.py b/mpsd-software.py index e32351a42e253199fe02988b86338afd84a0bacd..f7eec65f025d3ecd12ec9ea182b4c18ae0b303d5 100755 --- a/mpsd-software.py +++ b/mpsd-software.py @@ -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)