From f85ff292e5a5f2966621cbd76e8b6be67d855825 Mon Sep 17 00:00:00 2001 From: Atharva Mulmuley Date: Thu, 29 Apr 2021 14:10:20 +0530 Subject: [PATCH] removing cli extension if it already exists --- lib/arc-login.js | 1 + src/arc-login.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/arc-login.js b/lib/arc-login.js index 8dba8378..fedfb1d1 100644 --- a/lib/arc-login.js +++ b/lib/arc-login.js @@ -71,6 +71,7 @@ function getArcKubeconfig() { } yield az_login.main(); yield az_login.executeAzCliCommand(`account show`, false); + yield az_login.executeAzCliCommand(`extension remove -n connectedk8s`, false); yield az_login.executeAzCliCommand(`extension add -n connectedk8s`, false); yield az_login.executeAzCliCommand(`extension list`, false); const runnerTempDirectory = process.env['RUNNER_TEMP']; // Using process.env until the core libs are updated diff --git a/src/arc-login.ts b/src/arc-login.ts index 5a6b95b0..70054495 100644 --- a/src/arc-login.ts +++ b/src/arc-login.ts @@ -67,6 +67,7 @@ export async function getArcKubeconfig(): Promise { } await az_login.main(); await az_login.executeAzCliCommand(`account show`, false); + await az_login.executeAzCliCommand(`extension remove -n connectedk8s`, false); await az_login.executeAzCliCommand(`extension add -n connectedk8s`, false); await az_login.executeAzCliCommand(`extension list`, false); const runnerTempDirectory = process.env['RUNNER_TEMP']; // Using process.env until the core libs are updated