diff --git a/contrib/macos/notarize.py.in b/contrib/macos/notarize.py.in index 18259c6c5..e042bface 100644 --- a/contrib/macos/notarize.py.in +++ b/contrib/macos/notarize.py.in @@ -67,4 +67,10 @@ while not done: print("\033[1K\r(+{:d}m{:02d}s) {}: {}".format(mins, secs, st, status), end='', flush=True) print("\n") -sys.exit(0 if success else 42) +if not success: + sys.exit(42) + +print("Stapling {}".format(pkg)) +result = subprocess.run(['xcrun', 'stapler', 'staple', pkg]) + +result.check_returncode()