diff --git a/lib/src/commands/install.dart b/lib/src/commands/install.dart index bc13e11..691de76 100644 --- a/lib/src/commands/install.dart +++ b/lib/src/commands/install.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:io'; import 'package:args/command_runner.dart'; import 'package:glob/glob.dart'; -import 'package:homedir/homedir.dart'; import 'package:io/ansi.dart'; import 'package:mustache4dart/mustache4dart.dart' as mustache; import 'package:path/path.dart' as p; diff --git a/lib/src/util.dart b/lib/src/util.dart index e40b0d2..09ca3a5 100644 --- a/lib/src/util.dart +++ b/lib/src/util.dart @@ -8,6 +8,11 @@ final String checkmark = ansiOutputEnabled ? '\u2713' : '[Success]'; final String ballot = ansiOutputEnabled ? '\u2717' : '[Failure]'; +String get homeDirPath => + Platform.environment['HOME'] ?? Platform.environment['USERPROFILE']; + +Directory get homeDir => new Directory(homeDirPath); + Future loadPubspec([Directory directory]) { directory ??= Directory.current; var file = new File.fromUri(directory.uri.resolve('pubspec.yaml'));