Skip to content
Snippets Groups Projects

Unique exit codes

Merged Ashwin Kumar Karnad requested to merge unique-exit-codes into main
3 files
+ 27
10
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -830,7 +830,7 @@ def get_native_microarchitecture():
@@ -830,7 +830,7 @@ def get_native_microarchitecture():
msg += "Documentation of package: https://archspec.readthedocs.io/"
msg += "Documentation of package: https://archspec.readthedocs.io/"
logging.error(msg)
logging.error(msg)
sys.exit(1)
sys.exit(10)
else: # we have found archspec and executed it
else: # we have found archspec and executed it
if process.returncode == 0: # sanity check
if process.returncode == 0: # sanity check
microarch = process.stdout.strip()
microarch = process.stdout.strip()
@@ -919,7 +919,7 @@ def install_environment(
@@ -919,7 +919,7 @@ def install_environment(
msg += f" in release {mpsd_release}. "
msg += f" in release {mpsd_release}. "
msg += "Use 'available' command to see list of available package_sets."
msg += "Use 'available' command to see list of available package_sets."
logging.error(msg)
logging.error(msg)
sys.exit(1)
sys.exit(20)
# Install the package_sets
# Install the package_sets
with os_chdir(package_set_dir):
with os_chdir(package_set_dir):
@@ -1104,7 +1104,7 @@ def initialize_environment(root_dir: Path) -> None:
@@ -1104,7 +1104,7 @@ def initialize_environment(root_dir: Path) -> None:
logging.getLogger("print").info(
logging.getLogger("print").info(
f"Error: Directory {str(root_dir)} is already initialized."
f"Error: Directory {str(root_dir)} is already initialized."
)
)
sys.exit(1)
sys.exit(30)
else:
else:
# create the init file
# create the init file
init_file.touch()
init_file.touch()
@@ -1162,7 +1162,7 @@ def get_root_dir() -> Path:
@@ -1162,7 +1162,7 @@ def get_root_dir() -> Path:
+ f"and the hidden file `{config_vars['init_file']}`."
+ f"and the hidden file `{config_vars['init_file']}`."
" to check if a directory is initialised"
" to check if a directory is initialised"
)
)
sys.exit(1)
sys.exit(40)
def main():
def main():
Loading