catch gh auth error

pull/310/head
Frostebite 2022-01-29 22:52:28 +00:00
parent a83c3fa523
commit 5365a2de1e
3 changed files with 5 additions and 3 deletions

3
dist/index.js vendored
View File

@ -3728,7 +3728,8 @@ class GithubCliReader {
static GetGitHubAuthToken() {
return __awaiter(this, void 0, void 0, function* () {
try {
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status -t`))
// eslint-disable-next-line github/no-then
return ((yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status -t`).catch(() => { })) || '')
.split(`Token: `)[1]
.replace(/ /g, '')
.replace(/\n/g, '');

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,8 @@ import * as core from '@actions/core';
export class GithubCliReader {
static async GetGitHubAuthToken() {
try {
return (await CloudRunnerSystem.Run(`gh auth status -t`))
// eslint-disable-next-line github/no-then
return ((await CloudRunnerSystem.Run(`gh auth status -t`).catch(() => {})) || '')
.split(`Token: `)[1]
.replace(/ /g, '')
.replace(/\n/g, '');