Remove trailing slash in mpsd_release input
1 unresolved thread
1 unresolved thread
Removes the trailing slash in mpsd_release
if present, instead of throwing an error and exiting.
We do write a warning that this is happening:
❯ mpsd-software install dev-23a/ foss2021a-mpi
[14:01:04] WARNING Removed trailing slash from release: dev-23a mpsd_software.py:1266
Release dev-23a is prepared in /home/karnada/Sandbox/Projects/mpsd-software-environments/dev-23a
Release dev-23a is prepared in /home/karnada/Sandbox/Projects/mpsd-software-environments/dev-23a
##### Setting up spack
Cloning into 'spack'...
Closes #22 (closed)
Edited by Ashwin Kumar Karnad
Merge request reports
Activity
requested review from @hans.fangohr
1261 1261 initialise_environment(Path(os.getcwd())) 1262 1262 sys.exit(0) 1263 1263 1264 # sanity check for common mistakes in command line arguments 1265 if args.release.endswith("/"): # happens easily with autocompletion 1266 args.release = args.release.removesuffix("/") 1267 logging.warning(f"Removed trailing slash from release: {args.release}") if we use info, then it gets printed with 100 other stuff and is easy to miss; the idea with the warning was that we tell user that we are using a mpsd_release different than what was asked, it is so that the users are made aware of this rather than the fact that
/
is harmful (which is also no longer the case)
mentioned in commit e6e1939c
Please register or sign in to reply