Skip to content

Commit

Permalink
update uberenv to add error if spack clone fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed Oct 28, 2020
1 parent 7d639ee commit 6dd7e90
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/uberenv/uberenv.py
Expand Up @@ -404,9 +404,15 @@ def main():
os.chdir(pjoin(dest_dir,"spack"))
sexe("git checkout %s" % sha1,echo=True)

# We should now have spack, but double check
# in case clone failed
if not os.path.isdir(dest_spack):
print("[ERROR: failed to clone spack to {}]".format(dest_spack))
return -1

if opts["spack_pull"]:
# do a pull to make sure we have the latest
os.chdir(pjoin(dest_dir,"spack"))
os.chdir(dest_spack)
sexe("git stash", echo=True)
sexe("git pull", echo=True)

Expand Down

0 comments on commit 6dd7e90

Please sign in to comment.