diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-24 17:22:19 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-24 17:22:19 +0000 |
commit | dac45299dd57c6cb240424b93fd28a085605bd90 (patch) | |
tree | 9e8ea51a0b0b9e56399638f8f8ccfbf940d6553f | |
parent | 602a1864b05075ca4283986e6f5c7d5bce864e11 (diff) | |
download | stable-diffusion-webui-gfx803-dac45299dd57c6cb240424b93fd28a085605bd90.tar.gz stable-diffusion-webui-gfx803-dac45299dd57c6cb240424b93fd28a085605bd90.tar.bz2 stable-diffusion-webui-gfx803-dac45299dd57c6cb240424b93fd28a085605bd90.zip |
make git commands not fail for extensions when you have spaces in webui directory
-rw-r--r-- | launch.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -108,18 +108,18 @@ def git_clone(url, dir, name, commithash=None): if commithash is None:
return
- current_hash = run(f'"{git}" -C {dir} rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip()
+ current_hash = run(f'"{git}" -C "{dir}" rev-parse HEAD', None, f"Couldn't determine {name}'s hash: {commithash}").strip()
if current_hash == commithash:
return
- run(f'"{git}" -C {dir} fetch', f"Fetching updates for {name}...", f"Couldn't fetch {name}")
- run(f'"{git}" -C {dir} checkout {commithash}', f"Checking out commit for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}")
+ run(f'"{git}" -C "{dir}" fetch', f"Fetching updates for {name}...", f"Couldn't fetch {name}")
+ run(f'"{git}" -C "{dir}" checkout {commithash}', f"Checking out commit for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}")
return
run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")
if commithash is not None:
- run(f'"{git}" -C {dir} checkout {commithash}', None, "Couldn't checkout {name}'s hash: {commithash}")
+ run(f'"{git}" -C "{dir}" checkout {commithash}', None, "Couldn't checkout {name}'s hash: {commithash}")
def version_check(commit):
|