Unverified Commit a70a852c authored by godofredoc's avatar godofredoc Committed by GitHub

Run gsutil with full python3 and full path. (#132805)

This is to prevent failures when the gsutil.py is not executable.
parent aa1bacb3
......@@ -833,16 +833,8 @@ class ArchivePublisher {
print('gsutil.py -- $args');
return '';
}
if (platform.isWindows) {
return _processRunner.runProcess(
<String>['python3', path.join(platform.environment['DEPOT_TOOLS']!, 'gsutil.py'), '--', ...args],
workingDirectory: workingDirectory,
failOk: failOk,
);
}
return _processRunner.runProcess(
<String>['gsutil.py', '--', ...args],
<String>['python3', path.join(platform.environment['DEPOT_TOOLS']!, 'gsutil.py'), '--', ...args],
workingDirectory: workingDirectory,
failOk: failOk,
);
......
......@@ -38,7 +38,7 @@ void main() {
final FakePlatform platform = FakePlatform(
operatingSystem: platformName,
environment: <String, String>{
'DEPOT_TOOLS': path.join('D:', 'depot_tools'),
'DEPOT_TOOLS': platformName == Platform.windows ? path.join('D:', 'depot_tools'): '/depot_tools',
},
);
group('ProcessRunner for $platform', () {
......@@ -378,7 +378,7 @@ void main() {
late Directory tempDir;
final String gsutilCall = platform.isWindows
? 'python3 ${path.join("D:", "depot_tools", "gsutil.py")}'
: 'gsutil.py';
: 'python3 ${path.join("/", "depot_tools", "gsutil.py")}';
final String releasesName = 'releases_$platformName.json';
final String archiveName = platform.isLinux ? 'archive.tar.xz' : 'archive.zip';
final String archiveMime = platform.isLinux ? 'application/x-gtar' : 'application/zip';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment