Use File.rename instead of mv to move AOT outputs (#16985)

This allows for testing with MemoryFileSystem, when tests are added.
This commit is contained in:
Chris Bracken 2018-04-25 20:50:53 -07:00 committed by GitHub
parent b45a260534
commit cd90a1ed73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,8 +419,8 @@ Future<String> _buildAotSnapshot(
const List<String> commonBuildOptions = const <String>['-arch', 'arm64', '-miphoneos-version-min=8.0'];
if (interpreter) {
await runCheckedAsync(<String>['mv', vmSnapshotData, fs.path.join(outputDir.path, kVmSnapshotData)]);
await runCheckedAsync(<String>['mv', isolateSnapshotData, fs.path.join(outputDir.path, kIsolateSnapshotData)]);
await fs.file(vmSnapshotData).rename(fs.path.join(outputDir.path, kVmSnapshotData));
await fs.file(isolateSnapshotData).rename(fs.path.join(outputDir.path, kIsolateSnapshotData));
await runCheckedAsync(<String>[
'xxd', '--include', kVmSnapshotData, fs.path.basename(kVmSnapshotDataC)