Remove trailing slash in mpsd_release input
1 unresolved thread
1 unresolved thread
Compare changes
Files
2@@ -1260,6 +1260,11 @@ def main():
@@ -1274,14 +1279,6 @@ def main():
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)
Perhaps
logging.debug
would be better thanlogging.warning
. But I am not sure here. Let's use this as is, and perhaps reconsider to change tologging.info
orlogging.debug
later. (Basically: if the warning shows up a lot, and there is no danger in having the extra/
at the end.)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)But the reason they get the slash is that they may use tab-completion to avoid having to type
dev-23a
. In that case, the error/warning message is frustrating: the trailing slash is not causing any harm, but the user is told off for using tab completion.