Skip to content

Commit 8f1c70c

Browse files
committed
Use env for portability
1 parent 1294098 commit 8f1c70c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

utils/update_checkout/update_checkout/update_checkout.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,24 +223,24 @@ def obtain_additional_swift_sources(pool_args):
223223
print("Cloning '" + repo_name + "'")
224224

225225
if skip_history:
226-
shell.run(['GIT_TERMINAL_PROMPT=0', 'git', 'clone', '--recursive',
227-
'--depth', '1', '--branch',
226+
shell.run(['env', 'GIT_TERMINAL_PROMPT=0', 'git', 'clone',
227+
'--recursive', '--depth', '1', '--branch',
228228
repo_branch, remote, repo_name],
229229
echo=True)
230230
else:
231-
shell.run(['GIT_TERMINAL_PROMPT=0', 'git', 'clone', '--recursive',
232-
remote, repo_name],
231+
shell.run(['env', 'GIT_TERMINAL_PROMPT=0', 'git', 'clone',
232+
'--recursive', remote, repo_name],
233233
echo=True)
234234
if scheme_name:
235235
src_path = os.path.join(SWIFT_SOURCE_ROOT, repo_name, ".git")
236-
shell.run(['GIT_TERMINAL_PROMPT=0', 'git', '--git-dir', src_path,
237-
'--work-tree',
236+
shell.run(['env', 'GIT_TERMINAL_PROMPT=0', 'git', '--git-dir',
237+
src_path, '--work-tree',
238238
os.path.join(SWIFT_SOURCE_ROOT, repo_name),
239239
'checkout', repo_branch], echo=False)
240240
with shell.pushd(os.path.join(SWIFT_SOURCE_ROOT, repo_name),
241241
dry_run=False, echo=False):
242-
shell.run(['GIT_TERMINAL_PROMPT=0', "git", "submodule", "update",
243-
"--recursive"],
242+
shell.run(['env', 'GIT_TERMINAL_PROMPT=0', "git", "submodule",
243+
"update", "--recursive"],
244244
echo=False)
245245

246246

0 commit comments

Comments
 (0)