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 +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 0.0.1+2
4+
5+ - Support an executable in a symlinked directory.
6+
37## 0.0.1+1
48
59- Fix for when the dart executable can't be found by ` which ` .
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ library cli_util;
66
77import 'dart:io' ;
88
9+ import 'package:path/path.dart' as p;
910import 'package:which/which.dart' ;
1011
1112/// Return the path to the current Dart SDK. This will return `null` if we are
@@ -45,6 +46,12 @@ Directory getSdkDir([List<String> cliArgs]) {
4546 executable = link.resolveSymbolicLinksSync ();
4647 }
4748
49+ Link parentLink = new Link (p.dirname (executable));
50+ if (parentLink.existsSync ()) {
51+ executable = p.join (
52+ parentLink.resolveSymbolicLinksSync (), p.basename (executable));
53+ }
54+
4855 File dartVm = new File (executable);
4956 Directory dir = dartVm.parent.parent;
5057 if (_isSdkDir (dir)) return dir;
Original file line number Diff line number Diff line change 11name : cli_util
2- version : 0.0.1+1
2+ version : 0.0.1+2
33author :
Dart Team <[email protected] > 44description : A library to help in building Dart command-line apps.
55homepage : https://github.com/dart-lang/cli_util
66environment :
77 sdk : ' >=1.0.0 <2.0.0'
88dependencies :
9+ path : ' >=1.0.0 <2.0.0'
910 which : ' >=0.1.2 <0.2.0'
1011dev_dependencies :
1112 unittest : ' >=0.11.0 <0.12.0'
You can’t perform that action at this time.
0 commit comments