From 10d46da6b910a653f9fb9fa525767af5cb831ef3 Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Sat, 16 May 2020 13:52:43 +0800 Subject: [PATCH] fix: app init fails when given path argument (#224) Fixes #219 --- src/commands/app/init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/app/init.js b/src/commands/app/init.js index 4e262736..239f596e 100644 --- a/src/commands/app/init.js +++ b/src/commands/app/init.js @@ -23,7 +23,6 @@ const chalk = require('chalk') class InitCommand extends BaseCommand { async run () { const { args, flags } = this.parse(InitCommand) - const env = yeoman.createEnv() let res if (args.path !== '.') { @@ -32,6 +31,7 @@ class InitCommand extends BaseCommand { process.chdir(destDir) } + const env = yeoman.createEnv() aioLogger.debug('creating new app with init command ', flags) // default project name and services