From f0fc3cfe22edeeedca2295773ef3adfeb1c6d3e2 Mon Sep 17 00:00:00 2001 From: Atharva Mulmuley Date: Thu, 29 Apr 2021 13:51:07 +0530 Subject: [PATCH] trying a fix for self hosted agent --- lib/arc-login.js | 2 +- src/arc-login.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/arc-login.js b/lib/arc-login.js index 294bdadc..9a6204cd 100644 --- a/lib/arc-login.js +++ b/lib/arc-login.js @@ -88,7 +88,7 @@ function getArcKubeconfig() { } else { console.log('using spn method for authenticating to arc cluster.'); - child_process_1.spawn('az', ['connectedk8s', 'proxy', '-n', clusterName, '-g', resourceGroupName, '-f', kubeconfigPath], { + child_process_1.spawn('az.cmd', ['connectedk8s', 'proxy', '-n', clusterName, '-g', resourceGroupName, '-f', kubeconfigPath], { detached: true, stdio: 'ignore' }).unref(); diff --git a/src/arc-login.ts b/src/arc-login.ts index 29c40ce2..5c01dec1 100644 --- a/src/arc-login.ts +++ b/src/arc-login.ts @@ -83,7 +83,7 @@ export async function getArcKubeconfig(): Promise { }).unref(); } else{ console.log('using spn method for authenticating to arc cluster.') - spawn('az',['connectedk8s','proxy','-n',clusterName,'-g',resourceGroupName,'-f',kubeconfigPath], { + spawn('az.cmd',['connectedk8s','proxy','-n',clusterName,'-g',resourceGroupName,'-f',kubeconfigPath], { detached: true, stdio: 'ignore' }).unref();