diff --git a/lib/commands/init/init.js b/lib/commands/init/init.js index 07d0944..8b59217 100644 --- a/lib/commands/init/init.js +++ b/lib/commands/init/init.js @@ -46,7 +46,7 @@ exports.builder = (yargs) => { const verifyBoogiApp = (ctx) => { return new Promise((resolve, reject) => { if (isBoogiApp(ctx.path)) { - reject("BooGi was already initialized!"); + reject(new Error("BooGi was already initialized!")); } else { resolve(); } @@ -128,7 +128,7 @@ exports.handler = async function (argv) { ], { ...argv, gitInfo: gitInfo, path: path } ).then((ctx) => { - if (typeof ctx === 'string') { + if (typeof ctx !== "object") { return false; } getVersion(ctx).collect((result) => {