Fixed init
This commit is contained in:
parent
f4b38337e0
commit
b9079bbe5f
1 changed files with 7 additions and 7 deletions
|
@ -129,7 +129,7 @@ class InitCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future _cloneRepo(Directory projectDir) async {
|
Future _cloneRepo(Directory projectDir) async {
|
||||||
late Directory boilerplateDir;
|
Directory boilerplateDir = Directory("./empty");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (await projectDir.exists()) {
|
if (await projectDir.exists()) {
|
||||||
|
@ -255,14 +255,14 @@ class InitCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future _pubGet(Directory projectDir) async {
|
Future _pubGet(Directory projectDir) async {
|
||||||
var pubPath = "dart pub";
|
var dartPath = "dart";
|
||||||
//print(darkGray.wrap('Running "$pubPath"...'));
|
print(darkGray.wrap('Running "$dartPath"...'));
|
||||||
print(darkGray.wrap('\$ $pubPath get'));
|
print(darkGray.wrap('\$ $dartPath pub get'));
|
||||||
var pub = await Process.start(pubPath, ['get'],
|
var dart = await Process.start(dartPath, ['pub', 'get'],
|
||||||
workingDirectory: projectDir.absolute.path,
|
workingDirectory: projectDir.absolute.path,
|
||||||
mode: ProcessStartMode.inheritStdio);
|
mode: ProcessStartMode.inheritStdio);
|
||||||
var code = await pub.exitCode;
|
var code = await dart.exitCode;
|
||||||
print('Pub process exited with code $code');
|
print('Dart process exited with code $code');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue