diff --git a/lib/main.js b/lib/main.js index a31f165..5e14a18 100644 --- a/lib/main.js +++ b/lib/main.js @@ -86,7 +86,13 @@ const generateInvalidPointTrace = async (execPath, match, filePath, textEditor, }; const determineExecVersion = async (execPath) => { - const versionString = await helpers.exec(execPath, ['--version'], { ignoreExitCode: true }); + let versionString; + try { + versionString = await helpers.exec(execPath, ['--version'], { ignoreExitCode: true }); + } catch (e) { + console.error(e); + versionString = await helpers.exec(execPath, ['--version'], { stream: 'stderr' }); + } const versionPattern = /^[^\s]+/g; const match = versionString.match(versionPattern); if (match !== null) {