do not fail from exception in github cli
parent
4341bf76c0
commit
7433e0f63c
|
|
@ -3574,6 +3574,25 @@ exports.GitRepoReader = GitRepoReader;
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
|
@ -3586,10 +3605,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.GithubCliReader = void 0;
|
exports.GithubCliReader = void 0;
|
||||||
const cloud_runner_system_1 = __webpack_require__(66879);
|
const cloud_runner_system_1 = __webpack_require__(66879);
|
||||||
|
const core = __importStar(__webpack_require__(42186));
|
||||||
class GithubCliReader {
|
class GithubCliReader {
|
||||||
static GetGitHubAuthToken() {
|
static GetGitHubAuthToken() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status -t`)).split(`Token: `)[1].replace(/ /g, '').replace(/\n/g, '');
|
try {
|
||||||
|
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status -t`))
|
||||||
|
.split(`Token: `)[1]
|
||||||
|
.replace(/ /g, '')
|
||||||
|
.replace(/\n/g, '');
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.info(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +1,15 @@
|
||||||
import { CloudRunnerSystem } from '../cli/remote-client/remote-client-services/cloud-runner-system';
|
import { CloudRunnerSystem } from '../cli/remote-client/remote-client-services/cloud-runner-system';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
|
||||||
export class GithubCliReader {
|
export class GithubCliReader {
|
||||||
static async GetGitHubAuthToken() {
|
static async GetGitHubAuthToken() {
|
||||||
return (await CloudRunnerSystem.Run(`gh auth status -t`)).split(`Token: `)[1].replace(/ /g, '').replace(/\n/g, '');
|
try {
|
||||||
|
return (await CloudRunnerSystem.Run(`gh auth status -t`))
|
||||||
|
.split(`Token: `)[1]
|
||||||
|
.replace(/ /g, '')
|
||||||
|
.replace(/\n/g, '');
|
||||||
|
} catch (error: any) {
|
||||||
|
core.info(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue