diff --git a/dist/index.js b/dist/index.js index 064c98f3..4013bdf7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5243,7 +5243,7 @@ var ContainerAppHelper = /** @class */ (function () { */ ContainerAppHelper.prototype.installPackCliAsync = function () { return __awaiter(this, void 0, void 0, function () { - var command, packZipDownloadUri, packZipDownloadFilePath, tgzSuffix, err_19; + var command, packZipDownloadUri, packZipDownloadFilePath, tgzSuffix, shell, err_19; return __generator(this, function (_a) { switch (_a.label) { case 0: @@ -5265,7 +5265,8 @@ var ContainerAppHelper = /** @class */ (function () { command = "(curl -sSL \"https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-" + tgzSuffix + ".tgz\" | " + 'tar -C /usr/local/bin/ --no-same-owner -xzv pack)'; } - return [4 /*yield*/, exec.exec(command)]; + shell = IS_WINDOWS_AGENT ? 'pwsh' : 'bash'; + return [4 /*yield*/, exec.exec(shell, [command])]; case 2: _a.sent(); return [3 /*break*/, 4]; diff --git a/src/ContainerAppHelper.ts b/src/ContainerAppHelper.ts index f0f35ea0..14daef1d 100644 --- a/src/ContainerAppHelper.ts +++ b/src/ContainerAppHelper.ts @@ -432,7 +432,8 @@ export class ContainerAppHelper { command = `(curl -sSL \"https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-${tgzSuffix}.tgz\" | ` + 'tar -C /usr/local/bin/ --no-same-owner -xzv pack)'; } - await exec.exec(command); + const shell = IS_WINDOWS_AGENT ? 'pwsh' : 'bash'; + await exec.exec(shell, [command]); } catch (err) { core.error(`Unable to install the pack CLI. Error: ${err.message}`); core.setFailed(err.message);