mirror of https://github.com/zulip/zulip.git
upgrade-zulip-from-git: Fix handling of errors in git clone.
Apparently, the `chown -R` would never run if the original clone attempt had networking errors, leading to inability to use upgrade-zulip-from-git without manual intervention.
This commit is contained in:
parent
d7b4de2348
commit
a716b09a3f
|
@ -48,6 +48,7 @@ try:
|
|||
logging.info("Cloning the repository")
|
||||
subprocess.check_call(["git", "clone", "-q", remote_url, "--mirror", LOCAL_GIT_CACHE_DIR],
|
||||
stdout=open('/dev/null', 'w'))
|
||||
if os.stat(LOCAL_GIT_CACHE_DIR).st_uid == 0:
|
||||
subprocess.check_call(["chown", "-R", "zulip:zulip", LOCAL_GIT_CACHE_DIR])
|
||||
|
||||
logging.info("Fetching the latest commits")
|
||||
|
|
Loading…
Reference in New Issue