This repository was archived by the owner on Nov 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 0.0.1+1
4+
5+ - Fix for when the dart executable can't be found by ` which ` .
6+
37## 0.0.1
48
59- Initial version
Original file line number Diff line number Diff line change @@ -38,15 +38,17 @@ Directory getSdkDir([List<String> cliArgs]) {
3838 // Try and locate the VM using 'which'.
3939 String executable = whichSync ('dart' , orElse: () => null );
4040
41- // In case Dart is symlinked (e.g. homebrew on Mac) follow symbolic links.
42- Link link = new Link (executable);
43- if (link.existsSync ()) {
44- executable = link.resolveSymbolicLinksSync ();
45- }
41+ if (executable != null ) {
42+ // In case Dart is symlinked (e.g. homebrew on Mac) follow symbolic links.
43+ Link link = new Link (executable);
44+ if (link.existsSync ()) {
45+ executable = link.resolveSymbolicLinksSync ();
46+ }
4647
47- File dartVm = new File (executable);
48- Directory dir = dartVm.parent.parent;
49- if (_isSdkDir (dir)) return dir;
48+ File dartVm = new File (executable);
49+ Directory dir = dartVm.parent.parent;
50+ if (_isSdkDir (dir)) return dir;
51+ }
5052
5153 return null ;
5254}
Original file line number Diff line number Diff line change 11name : cli_util
2- version : 0.0.1
2+ version : 0.0.1+1
33author :
Dart Team <[email protected] > 44description : A library to help in building Dart command-line apps.
55homepage : https://github.com/dart-lang/cli_util
You can’t perform that action at this time.
0 commit comments