From d24c444f45622baf5b3e2ceea67e657530687628 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Thu, 4 Oct 2018 11:30:12 -0400 Subject: [PATCH] Remove homedir --- lib/src/commands/install.dart | 1 - lib/src/util.dart | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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'));