Skip to content

Commit dca1add

Browse files
committed
[utils] Enable text mode for shell.run
1 parent 5674086 commit dca1add

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

utils/swift_build_support/swift_build_support/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def run(*args, **kwargs):
218218
return(None, 0, args)
219219

220220
my_pipe = subprocess.Popen(
221-
*args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
221+
*args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8', **kwargs)
222222
(stdout, stderr) = my_pipe.communicate()
223223
ret = my_pipe.wait()
224224

utils/update_checkout/update_checkout/update_checkout.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def check_parallel_results(results, op):
7070
print("%s failed (ret=%d): %s" % (r.repo_path, r.ret, r))
7171
fail_count += 1
7272
if r.stderr:
73-
print(r.stderr.decode('utf-8'))
73+
print(r.stderr)
7474
return fail_count
7575

7676

@@ -280,13 +280,14 @@ def obtain_additional_swift_sources(pool_args):
280280
print("Cloning '" + repo_name + "'")
281281

282282
if skip_history:
283-
shell.run(['git', 'clone', '--recursive', '--depth', '1',
284-
'--branch', repo_branch, remote, repo_name] +
283+
shell.run(['git', 'clone', '-c', 'core.symlinks=true', '-c', 'core.autocrlf=input',
284+
'--recursive', '--depth', '1', '--branch', repo_branch, remote, repo_name] +
285285
(['--no-tags'] if skip_tags else []),
286286
env=env,
287287
echo=True)
288288
else:
289-
shell.run(['git', 'clone', '--recursive', remote, repo_name] +
289+
shell.run(['git', 'clone', '-c', 'core.symlinks=true', '-c', 'core.autocrlf=input',
290+
'--recursive', remote, repo_name] +
290291
(['--no-tags'] if skip_tags else []),
291292
env=env,
292293
echo=True)

0 commit comments

Comments
 (0)