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 1
1
# Changelog
2
2
3
+ ## 0.0.1+1
4
+
5
+ - Fix for when the dart executable can't be found by ` which ` .
6
+
3
7
## 0.0.1
4
8
5
9
- Initial version
Original file line number Diff line number Diff line change @@ -38,15 +38,17 @@ Directory getSdkDir([List<String> cliArgs]) {
38
38
// Try and locate the VM using 'which'.
39
39
String executable = whichSync ('dart' , orElse: () => null );
40
40
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
+ }
46
47
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
+ }
50
52
51
53
return null ;
52
54
}
Original file line number Diff line number Diff line change 1
1
name : cli_util
2
- version : 0.0.1
2
+ version : 0.0.1+1
3
3
author : Dart Team <misc@dartlang.org>
4
4
description : A library to help in building Dart command-line apps.
5
5
homepage : https://github.com/dart-lang/cli_util
You can’t perform that action at this time.
0 commit comments