Remove homedir

This commit is contained in:
Tobe O 2018-10-04 11:30:12 -04:00
parent 68b56872bd
commit d24c444f45
2 changed files with 5 additions and 1 deletions

View file

@ -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;

View file

@ -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<Pubspec> loadPubspec([Directory directory]) {
directory ??= Directory.current;
var file = new File.fromUri(directory.uri.resolve('pubspec.yaml'));