Never let git prompt
This commit is contained in:
parent
44fa85bdf0
commit
a96d6726ad
@ -207,9 +207,11 @@ def build_container_image(app_record, tag, extra_build_args=[]):
|
|||||||
print(f"Cloning repository {repo} to {clone_dir} ...")
|
print(f"Cloning repository {repo} to {clone_dir} ...")
|
||||||
if ref:
|
if ref:
|
||||||
# TODO: Determing branch or hash, and use depth 1 if we can.
|
# TODO: Determing branch or hash, and use depth 1 if we can.
|
||||||
result = subprocess.run(["git", "clone", repo, clone_dir])
|
git_env = dict(os.environ.copy())
|
||||||
result.check_returncode()
|
# Never prompt
|
||||||
subprocess.check_call(["git", "checkout", ref], cwd=clone_dir)
|
git_env["GIT_TERMINAL_PROMPT"] = "0"
|
||||||
|
subprocess.check_call(["git", "clone", repo, clone_dir], env=git_env)
|
||||||
|
subprocess.check_call(["git", "checkout", ref], cwd=clone_dir, env=git_env)
|
||||||
else:
|
else:
|
||||||
result = subprocess.run(["git", "clone", "--depth", "1", repo, clone_dir])
|
result = subprocess.run(["git", "clone", "--depth", "1", repo, clone_dir])
|
||||||
result.check_returncode()
|
result.check_returncode()
|
||||||
|
Loading…
Reference in New Issue
Block a user