Skip to content

Commit a67b8c5

Browse files
srawlinsCommit Queue
authored andcommitted
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 <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 61952d4 commit a67b8c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/dartdev/lib/src/commands/language_server.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ For more information about the server's capabilities and configuration, see:
5050
}
5151
try {
5252
if (argResults!.flag(_useAotSnapshotFlag)) {
53+
if (!Sdk.checkArtifactExists(sdk.dartAotRuntime)) {
54+
return _genericErrorExitCode;
55+
}
5356
args.remove('--$_useAotSnapshotFlag');
5457
VmInteropHandler.run(
5558
sdk.dartAotRuntime,
@@ -75,4 +78,6 @@ For more information about the server's capabilities and configuration, see:
7578
}
7679

7780
static const _useAotSnapshotFlag = 'use-aot-snapshot';
81+
82+
static const _genericErrorExitCode = 255;
7883
}

0 commit comments

Comments
 (0)