From 802b94954bb6df3d03aa37d0de47aa24e55649ea Mon Sep 17 00:00:00 2001 From: i066088 Date: Sun, 8 Aug 2021 21:31:41 +0800 Subject: [PATCH] fix: mbt not found even if mbt is installed by npm --- src/utils/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 761619b..763d84f 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -138,8 +138,9 @@ export class Utils { const homeDir = os.homedir(); const response = await Utils.execCommand(cliName, ["-v"], { cwd: homeDir, + shell: true, }); - if (response.exitCode === "ENOENT") { + if (response.exitCode != 0) { logger.error(`The ${cliName} Tool is not installed in the environment`); void window.showErrorMessage(errMessage); return false;