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

use `error` to report the problem: gives clearer message

due to color

Remove printing of current working directory to debug message: usually the user
will know in which directory they are, so this information detracts from the
interesting content of the error message.
parent a36715e5
No related branches found
No related tags found
1 merge request!104Improve error if current directory (or parents) are not MPSD software instance
...@@ -1153,10 +1153,11 @@ def get_root_dir() -> Path: ...@@ -1153,10 +1153,11 @@ def get_root_dir() -> Path:
return script_call_dir return script_call_dir
# if not found in any parent directory, exit with an error message # if not found in any parent directory, exit with an error message
logging.getLogger("print").info( logging.debug(f"Directory {str(script_call_dir)} is not a MPSD software instance.")
logging.error(
"Error: Could not find MPSD software instance " "Error: Could not find MPSD software instance "
"in the current directory or any parent directory.\n" "in the current directory or any parent directory.\n"
f"Directory {str(script_call_dir)} is not a MPSD software instance.\n"
"Please run 'mpsd-software init' to " "Please run 'mpsd-software init' to "
"initialise the software instance here, " "initialise the software instance here, "
"or switch to a directory which is already initialised.\n \n" "or switch to a directory which is already initialised.\n \n"
......
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