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.info("Starting git svn clone (this may take a while)…")
|
||||||
logger.debug("Running: %s", " ".join(str(a) for a in args))
|
logger.debug("Running: %s", " ".join(str(a) for a in args))
|
||||||
|
|
||||||
|
password = svn_cfg.password or ""
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
args,
|
args,
|
||||||
stdin=subprocess.DEVNULL,
|
stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
text=True,
|
text=True,
|
||||||
@@ -235,6 +236,9 @@ class Mirror:
|
|||||||
line = line.rstrip()
|
line = line.rstrip()
|
||||||
if line:
|
if line:
|
||||||
logger.info("[git svn] %s", 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()
|
ret = process.wait()
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user