diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart index 98bb4d7fd9a..6cd6ec73edb 100644 --- a/dev/bots/prepare_package.dart +++ b/dev/bots/prepare_package.dart @@ -487,14 +487,13 @@ class ArchivePublisher { if (dest.endsWith('.json')) { mimeType = 'application/json'; } - final List args = ['cp']; + final List args = []; // Use our preferred MIME type for the files we care about // and let gsutil figure it out for anything else. if (mimeType != null) { args.addAll(['-h', 'Content-Type:$mimeType']); } - args.add(src); - args.add(dest); + args.addAll(['cp', src, dest]); return _runGsUtil(args); } } diff --git a/dev/bots/test/prepare_package_test.dart b/dev/bots/test/prepare_package_test.dart index 8fe6ebbd545..e1ba9d10880 100644 --- a/dev/bots/test/prepare_package_test.dart +++ b/dev/bots/test/prepare_package_test.dart @@ -239,10 +239,10 @@ void main() { '''; final Map> calls = >{ 'gsutil rm $gsArchivePath': null, - 'gsutil cp -h Content-Type:$archiveMime $archivePath $gsArchivePath': null, + 'gsutil -h Content-Type:$archiveMime cp $archivePath $gsArchivePath': null, 'gsutil cat $gsJsonPath': [new ProcessResult(0, 0, releasesJson, '')], 'gsutil rm $gsJsonPath': null, - 'gsutil cp -h Content-Type:application/json $jsonPath $gsJsonPath': null, + 'gsutil -h Content-Type:application/json cp $jsonPath $gsJsonPath': null, }; processManager.fakeResults = calls; final File outputFile = new File(path.join(tempDir.absolute.path, archiveName));