Run gsutil with full python3 and full path. (#132805)
This is to prevent failures when the gsutil.py is not executable.
This commit is contained in:
parent
aa1bacb35a
commit
a70a852c66
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user