diff --git a/misc/python/materialize/cli/bazel.py b/misc/python/materialize/cli/bazel.py index df11cd6cf928d..0cba000875e2c 100644 --- a/misc/python/materialize/cli/bazel.py +++ b/misc/python/materialize/cli/bazel.py @@ -116,7 +116,12 @@ def integrity_cmd(config: BuildConfig, args: list[str]): def bazel_cmd(config: BuildConfig, args: list[str]): """Forwards all arguments to Bazel, possibly with extra configuration.""" remote_cache = remote_cache_arg(config) - subprocess.run(["bazel", *args, *remote_cache], check=True) + try: + subprocess.run(["bazel", *args, *remote_cache], check=True) + except: + # Don't print any python backtrace because it's never useful. Instead + # just exit the process. + exit(1) def gen(config: BuildConfig, path: Path | None, check: bool):