Skip to content

Commit

Permalink
try other syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
n-g committed Sep 6, 2023
1 parent eef7148 commit 88fc215
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
12 changes: 7 additions & 5 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6962,11 +6962,13 @@ function run() {
try {
yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group(`Prepare access to Namespace`, () => __awaiter(this, void 0, void 0, function* () {
var commandExists = __nccwpck_require__(1569);
commandExists("nsc")
.then(function () {
_actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`Namespace Cloud CLI found.`);
})
.catch(installNsc());
commandExists("nsc", function (err, commandExists) {
if (commandExists) {
_actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`Namespace Cloud CLI found.`);
return;
}
installNsc();
});
yield _actions_exec__WEBPACK_IMPORTED_MODULE_2__.exec("nsc version");
}));
const registry = yield _actions_core__WEBPACK_IMPORTED_MODULE_0__.group(`Log into Namespace workspace`, () => __awaiter(this, void 0, void 0, function* () {
Expand Down
11 changes: 7 additions & 4 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ async function run(): Promise<void> {
await core.group(`Prepare access to Namespace`, async () => {
var commandExists = require("command-exists");

commandExists("nsc")
.then(function () {
commandExists("nsc", function (err, commandExists) {
if (commandExists) {
core.info(`Namespace Cloud CLI found.`);
})
.catch(installNsc());
return;
}

installNsc();
});

await exec.exec("nsc version");
});
Expand Down

0 comments on commit 88fc215

Please sign in to comment.