diff --git a/src/pythonManager.ts b/src/pythonManager.ts index 91c4ed610..111d24e95 100644 --- a/src/pythonManager.ts +++ b/src/pythonManager.ts @@ -182,7 +182,12 @@ export async function installExtensionPyReqs( OutputChannel.appendLine(debugAdapterRequirements + reqDoesNotExists); return; } - const espIdfVersion = await utils.getEspIdfFromCMake(espDir); + const fullEspIdfVersion = await utils.getEspIdfFromCMake(espDir); + const majorMinorMatches = fullEspIdfVersion.match(/([0-9]+\.[0-9]+).*/); + const espIdfVersion = + majorMinorMatches && majorMinorMatches.length > 0 + ? majorMinorMatches[1] + : "x.x"; const constrainsFile = join( idfToolsDir, `espidf.constraints.v${espIdfVersion}.txt`