DAS AOT: check artifact exists; remove negated flag

Change-Id: Ic222050fd5a2e091ab8e2063c018fa8707614168
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424705
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
Sam Rawlins
2025-04-28 19:28:28 -07:00
committed by Commit Queue
parent 61952d4a1f
commit a67b8c503e
@@ -50,6 +50,9 @@ For more information about the server's capabilities and configuration, see:
}
try {
if (argResults!.flag(_useAotSnapshotFlag)) {
if (!Sdk.checkArtifactExists(sdk.dartAotRuntime)) {
return _genericErrorExitCode;
}
args.remove('--$_useAotSnapshotFlag');
VmInteropHandler.run(
sdk.dartAotRuntime,
@@ -75,4 +78,6 @@ For more information about the server's capabilities and configuration, see:
}
static const _useAotSnapshotFlag = 'use-aot-snapshot';
static const _genericErrorExitCode = 255;
}