diff --git a/src/west/commands.py b/src/west/commands.py index 1abb0fcd..cad13425 100644 --- a/src/west/commands.py +++ b/src/west/commands.py @@ -511,7 +511,11 @@ def die(self, *args, exit_code: int = 1) -> NoReturn: Equivalent to ``die(*args, fatal=True)``, followed by an attempt to abort with the given *exit_code*.''' self.err(*args, fatal=True) - sys.exit(exit_code) + if self.verbosity >= Verbosity.DBG_EXTREME: + raise RuntimeError("die with -vvv or more shows a stack trace. " + "exit_code argument is ignored.") + else: + sys.exit(exit_code) @property def color_ui(self) -> bool: