cli_util
cli_util copied to clipboard
getSdkPath doesn't work when using the dart executable produced when building from source.
// test.dart
import 'package:cli_util/cli_util.dart';
main() {
print(getSdkPath());
}
dart-sdk/sdk$ out/ReleaseX64/dart test.dart
/usr/local/google/home/sigurdm/projects/dart-sdk/sdk/out
That is not really a helpful directory. I am not sure where the out/ReleaseX64/dart binary reads its corelibs from, but I think that should be the returned directory.
This might be a duplicate of: https://github.com/dart-lang/cli_util/issues/38 - not sure