Remove exit(0) (#33896)

Since they cause --backtrace to report backtraces even with exit code 0
This commit is contained in:
Harmen Stoppels 2022-11-15 14:35:44 +01:00 committed by GitHub
parent 850c54c3b1
commit 2948248d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View File

@ -454,7 +454,7 @@ def check_fn(args):
if not specs:
tty.msg("No specs provided, exiting.")
sys.exit(0)
return
for spec in specs:
spec.concretize()
@ -467,9 +467,10 @@ def check_fn(args):
if not configured_mirrors:
tty.msg("No mirrors provided, exiting.")
sys.exit(0)
return
sys.exit(bindist.check_specs_against_mirrors(configured_mirrors, specs, args.output_file))
if bindist.check_specs_against_mirrors(configured_mirrors, specs, args.output_file) == 1:
sys.exit(1)
def download_fn(args):
@ -479,11 +480,11 @@ def download_fn(args):
least one of the required buildcache components."""
if not args.spec and not args.spec_file:
tty.msg("No specs provided, exiting.")
sys.exit(0)
return
if not args.path:
tty.msg("No download path provided, exiting")
sys.exit(0)
return
spec = _concrete_spec_from_args(args)
result = bindist.download_single_spec(spec, args.path)
@ -532,8 +533,6 @@ def save_specfile_fn(args):
root_spec_as_json, args.specfile_dir, args.specs.split(), spec_format
)
sys.exit(0)
def copy_buildcache_file(src_url, dest_url, local_path=None):
"""Copy from source url to destination url"""

View File

@ -6,7 +6,6 @@
import json
import os
import shutil
import sys
import llnl.util.filesystem as fs
import llnl.util.tty as tty
@ -503,7 +502,7 @@ def ci_rebuild(args):
bindist.download_single_spec(job_spec, build_cache_dir, mirror_url=matching_mirror)
# Now we are done and successful
sys.exit(0)
return 0
# Before beginning the install, if this is a "rebuild everything" pipeline, we
# only want to keep the mirror being used by the current pipeline as it's binary