Skip to content

Commit

Permalink
Update method to install pack cli
Browse files Browse the repository at this point in the history
  • Loading branch information
snehapar9 committed Sep 23, 2023
1 parent d1ca793 commit 3e9bb7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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];
Expand Down
3 changes: 2 additions & 1 deletion src/ContainerAppHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3e9bb7e

Please sign in to comment.