-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
When the Dart executable is accessed through a symlink Platform.resolvedExecutable no longer resolves the symlink.
For my local development setup I add the following symlink to my path so my local Dart executable is always accessible through it.
/Users/nshahan/dart-sdk/bin
That path is on a symlink I have setup so that I can change at any time when I want to configure what version of the Dart SDK I am running.
This program illustrates the difference I am seeing.
import 'dart:io';
main() {
print(Platform.executable);
print(Platform.resolvedExecutable);
}When running with this symlink pointing to a stable Dart 3.8.1 download:
/Users/nshahan/dart-sdk -> /Users/nshahan/.dart-sdks/3.8.1
$ /Users/nshahan/dart-sdk/bin/dart repro.dart
dart
/Users/nshahan/.dart-sdks/3.8.1/bin/dart
When running with this symlink pointing to a local Dart SDK build after ab44b20:
/Users/nshahan/dart-sdk -> /Users/nshahan/code/dart-sdk/sdk/xcodebuild/ReleaseARM64/dart-sdk
$ /Users/nshahan/dart-sdk/bin/dart repro.dart
/Users/nshahan/dart-sdk/bin/dart
/Users/nshahan/dart-sdk/bin/dart
cc @a-siva