From 696cdc32002747d2c835b2119ac3a967b8fec33a Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Wed, 27 Sep 2023 22:22:57 -0700 Subject: [PATCH] Fix regex replace (#24525) --- extensions/resource-deployment/src/services/tools/azCliTool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/resource-deployment/src/services/tools/azCliTool.ts b/extensions/resource-deployment/src/services/tools/azCliTool.ts index 50ca8409fd7e..5ff560a51644 100644 --- a/extensions/resource-deployment/src/services/tools/azCliTool.ts +++ b/extensions/resource-deployment/src/services/tools/azCliTool.ts @@ -57,7 +57,7 @@ export class AzCliTool extends ToolBase { protected getVersionFromOutput(output: string): SemVer | undefined { if (output && output.includes('azure-cli')) { - return new SemVer(output.split(EOL)[0].replace('azure-cli', '').replace(/ /g, '').replace('*', '')); + return new SemVer(output.split(EOL)[0].replace(/azure-cli/g, '').replace(/ /g, '').replace(/\*/g, '')); } else { return undefined; }