Skip to content

Commit fe6e30e

Browse files
committed
auto accept prompt on windows
1 parent 00f7223 commit fe6e30e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pbsync/pbsync.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ def sync_handler(sync_val: str, repository_val=None, requested_bundle_name=None)
5858
needs_git_update = True
5959
if sys.platform == "win32" or sys.platform == "darwin":
6060
pblog.info("Attempting auto-update of Git...")
61-
proc = pbtools.run([pbgit.get_git_executable(), "update-microsoft-git"])
61+
if sys.platform == "win32":
62+
proc = pbtools.run([pbgit.get_git_executable(), "upgrade-git-for-windows", "-y"])
63+
else:
64+
proc = pbtools.run([pbgit.get_git_executable(), "update-microsoft-git"])
6265
# if non-zero, error out
6366
if proc.returncode:
64-
pblog.error(proc.out)
67+
pblog.warning("Git auto-update failed. Please try manually:")
6568
else:
6669
needs_git_update = False
6770
input("Launching Git update, please press enter when done installing. ")

0 commit comments

Comments
 (0)