Skip to content

Commit

Permalink
Update Azure CLI extensions installation
Browse files Browse the repository at this point in the history
  • Loading branch information
snehapar9 committed Sep 24, 2023
1 parent ed6309f commit 4948dc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5638,8 +5638,6 @@ exports.__esModule = true;
exports.Utility = void 0;
var core = __nccwpck_require__(195);
var exec = __nccwpck_require__(714);
var util = __nccwpck_require__(837);
var cpExec = util.promisify((__nccwpck_require__(81).exec));
var Utility = /** @class */ (function () {
function Utility() {
}
Expand Down Expand Up @@ -5700,7 +5698,7 @@ var Utility = /** @class */ (function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, cpExec("az config set extension.use_dynamic_install=yes_without_prompt")];
case 0: return [4 /*yield*/, new Utility().executeAndthrowIfError('az', ["config", "set", "extension.use_dynamic_install=yes_without_prompt"])];
case 1:
_a.sent();
return [2 /*return*/];
Expand Down
4 changes: 1 addition & 3 deletions src/Utility.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import util = require('util');
const cpExec = util.promisify(require('child_process').exec);
export class Utility {
/**
* @param commandLine - the command to execute
Expand Down Expand Up @@ -50,7 +48,7 @@ export class Utility {
* Azure Container Apps module being dynamically installed while it's still in preview.
*/
public async setAzureCliDynamicInstall() {
await cpExec(`az config set extension.use_dynamic_install=yes_without_prompt`);
await new Utility().executeAndthrowIfError('az', [`config`, `set`, `extension.use_dynamic_install=yes_without_prompt`]);
}

/**
Expand Down

0 comments on commit 4948dc7

Please sign in to comment.