From d6e300f3628e49984b178323cec7c3e2f8dd9b70 Mon Sep 17 00:00:00 2001 From: Radu Date: Thu, 5 Dec 2024 10:28:39 +0200 Subject: [PATCH] Use major + minor versions, remove patch version (#1360) --- src/pythonManager.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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`