Skip to content

Commit 9337562

Browse files
authored
Enhance null check, and bump packages (#32)
Signed-off-by: peterdeme <[email protected]>
1 parent 11437a8 commit 9337562

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32667,8 +32667,8 @@ function getLatestVersion() {
3266732667
repo: "spacectl",
3266832668
});
3266932669
const releaseList = releaseResponse.data;
32670-
if (!releaseList) {
32671-
const errMsg = "Could not find any releases for Spacectl";
32670+
if (!(releaseList === null || releaseList === void 0 ? void 0 : releaseList.length)) {
32671+
const errMsg = "Could not find any releases for Spacectl. GitHub outage perhaps? https://www.githubstatus.com/";
3267232672
core.setFailed(errMsg);
3267332673
throw new Error(errMsg);
3267432674
}

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/install.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ async function getLatestVersion(): Promise<string> {
9393
});
9494
const releaseList = releaseResponse.data;
9595

96-
if (!releaseList) {
97-
const errMsg = "Could not find any releases for Spacectl";
96+
if (!releaseList?.length) {
97+
const errMsg = "Could not find any releases for Spacectl. GitHub outage perhaps? https://www.githubstatus.com/";
9898
core.setFailed(errMsg);
9999
throw new Error(errMsg);
100100
}

0 commit comments

Comments
 (0)