From 048ca7806b6c29cc6bf7145f3623a7f88517c465 Mon Sep 17 00:00:00 2001 From: Delan Azabani Date: Tue, 8 Aug 2023 17:09:27 +0800 Subject: [PATCH] mach: fix exit status on NixOS (#30079) --- mach | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mach b/mach index c521eaf9231..ff2e5c143db 100755 --- a/mach +++ b/mach @@ -40,7 +40,8 @@ if __name__ == '__main__': print('NOTE: Entering nix-shell etc/shell.nix') try: # sys argv already contains the ./mach part, so we just need to pass it as-is - subprocess.Popen(['nix-shell', mach_dir + '/etc/shell.nix', '--run', ' '.join(map(quote, sys.argv))]).wait() + result = subprocess.run(['nix-shell', mach_dir + '/etc/shell.nix', '--run', ' '.join(map(quote, sys.argv))]) + sys.exit(result.returncode) except KeyboardInterrupt: sys.exit(0) else: