Skip to content

Commit ba64513

Browse files
authored
Merge pull request #513 from ahoppen/pr/fail-if-source-generation-fails
Return non-zero exit code in build-script.py if source generation fails
2 parents 0ce9b80 + 7236b34 commit ba64513

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build-script.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def run_code_generation(toolchain, build_dir, multiroot_data_file, release, verb
328328
# Tell other projects in the unified build to use local dependencies
329329
env["SWIFTCI_USE_LOCAL_DEPS"] = "1"
330330
env["SWIFT_SYNTAX_PARSER_LIB_SEARCH_PATH"] = os.path.join(toolchain, "lib", "swift", "macosx")
331-
return call(swiftpm_call, env=env, verbose=verbose) == 0
331+
return check_call(swiftpm_call, env=env, verbose=verbose) == 0
332332

333333

334334
def make_dir_if_needed(path):
@@ -656,6 +656,7 @@ def generate_source_code_command(args):
656656
printerr("FAIL: Generating .gyb files failed")
657657
printerr("Executing: %s" % " ".join(e.cmd))
658658
printerr(e.output)
659+
raise SystemExit(1)
659660

660661
if not args.gyb_only:
661662
run_code_generation(

0 commit comments

Comments
 (0)