Skip to content

Commit 4811f4f

Browse files
committed
Add error handling
1 parent 6a3580a commit 4811f4f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

SConstruct

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,14 @@ def separate_debug_symbols(target, source, env):
272272
if target_name.endswith(".dylib"):
273273
target_name = os.path.splitext(target_name)[0]
274274
dsym_path = f"{out_dir}/dSYMs/{target_name}.dSYM"
275-
os.system(f"dsymutil \"{target_path}\" -o \"{dsym_path}\"")
276-
os.system(f"strip -u -r \"{target_path}\"")
275+
err = os.system(f"dsymutil \"{target_path}\" -o \"{dsym_path}\"")
276+
if err != 0:
277+
print(f"ERROR: Failed to split debug symbols (exit code {err})")
278+
Exit(1)
279+
err = os.system(f"strip -u -r \"{target_path}\"")
280+
if err != 0:
281+
print(f"ERROR: Failed to strip debug symbols (exit code {err})")
282+
Exit(1)
277283

278284
if env.get("separate_debug_symbols", True):
279285
from SCons.Script import Action

0 commit comments

Comments
 (0)