trying with az login as separate action

This commit is contained in:
Atharva Mulmuley
2021-05-04 12:36:21 +05:30
parent aff8b97341
commit b7a1b9b564
5 changed files with 43 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ function getArcKubeconfig() {
if (!clusterName) {
throw Error("'clusterName' is not passed for arc cluster.");
}
yield az_login.main();
//await az_login.main();
yield az_login.executeAzCliCommand(`account show`, false);
try {
yield az_login.executeAzCliCommand(`extension remove -n connectedk8s`, false);

View File

@@ -124,6 +124,7 @@ function main() {
exports.main = main;
function executeAzCliCommand(command, silent, execOptions = {}, args = []) {
return __awaiter(this, void 0, void 0, function* () {
azPath = yield io.which("az", true);
execOptions.silent = !!silent;
try {
yield exec.exec(`"${azPath}" ${command}`, args, execOptions);