fix: pipe SVN password to git svn stdin when prompted
This commit is contained in:
@@ -223,9 +223,10 @@ class Mirror:
|
||||
logger.info("Starting git svn clone (this may take a while)…")
|
||||
logger.debug("Running: %s", " ".join(str(a) for a in args))
|
||||
|
||||
password = svn_cfg.password or ""
|
||||
process = subprocess.Popen(
|
||||
args,
|
||||
stdin=subprocess.DEVNULL,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
text=True,
|
||||
@@ -235,6 +236,9 @@ class Mirror:
|
||||
line = line.rstrip()
|
||||
if line:
|
||||
logger.info("[git svn] %s", line)
|
||||
if "Password for" in line and password:
|
||||
process.stdin.write(password + "\n")
|
||||
process.stdin.flush()
|
||||
|
||||
ret = process.wait()
|
||||
if ret != 0:
|
||||
|
||||
Reference in New Issue
Block a user