Skip to content

Commit

Permalink
🐛 Handle git submodule command exception (#2406)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Jan 4, 2024
1 parent 69fa821 commit d21894e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@


def sync_submodules():
subprocess.run(["git", "submodule", "init"], check=True, cwd=repo_root)
subprocess.run(["git", "submodule", "update"], check=True, cwd=repo_root)
try:
subprocess.run(["git", "submodule", "init"], check=True, cwd=repo_root)
subprocess.run(["git", "submodule", "update"], check=True, cwd=repo_root)
except Exception as e:
print(e)
print("Warning: ControlNet failed to sync submodules. Please try run "
"`git submodule init` and `git submodule update` manually.")


def comparable_version(version: str) -> Tuple:
Expand Down

0 comments on commit d21894e

Please sign in to comment.