diff --git a/src/contributes/commandsBase.ts b/src/contributes/commandsBase.ts index 330fc38..85b23d9 100644 --- a/src/contributes/commandsBase.ts +++ b/src/contributes/commandsBase.ts @@ -13,13 +13,17 @@ export function checkDevChatDependency(pythonCommand: string): boolean { } else { logger.channel()?.info(`Failed to obtain the pipx environment path.`); } - - // Check if DevChat is installed - runCommand('devchat --help'); - return true; } catch (error) { // DevChat dependency check failed // log out detail error message + logger.channel()?.info(`Failed to check DevChat dependency due to error: ${error}`); + } + + try { + // Check if DevChat is installed + runCommand('devchat --help'); + return true; + } catch(error) { logger.channel()?.error(`Failed to check DevChat dependency due to error: ${error}`); return false; }