Skip to content

Commit

Permalink
Merge pull request #378 from rest-for-physics/pull-submodules-bug
Browse files Browse the repository at this point in the history
Addressing bug in pull-submodules
  • Loading branch information
juanangp authored Feb 22, 2023
2 parents d50979e + b4efcb3 commit 7440060
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pull-submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def main():
if force:
print("Forcing reset: ", end="")
p = subprocess.run(
f"git submodule foreach --recursive 'git reset --hard'", #
f"git submodule foreach --recursive 'git reset --hard || true'", #
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand All @@ -259,7 +259,7 @@ def main():
if latest:
print("Pulling submodules: ", end="")
p = subprocess.run(
f"git submodule foreach --recursive 'git fetch; if [ -z \"$(git ls-remote --heads origin {frameworkBranchName})\" ]; then git checkout master; else git checkout {frameworkBranchName};fi;git pull'", #
f"git submodule foreach --recursive 'git fetch; if [ -z \"$(git ls-remote --heads origin {frameworkBranchName})\" ]; then git checkout master; else git checkout {frameworkBranchName};fi;git pull || true'", #
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand All @@ -282,7 +282,7 @@ def main():
print("[\033[92m OK \x1b[0m]")
# get commit id
p = subprocess.run(
f"git submodule foreach --recursive 'git rev-parse HEAD'", #
f"git submodule foreach --recursive 'git rev-parse HEAD || true'", #
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand Down

0 comments on commit 7440060

Please sign in to comment.