Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
9d4eb5954f | |||
0073e65191 |
10
dist/setup/index.js
vendored
10
dist/setup/index.js
vendored
@@ -61594,14 +61594,12 @@ function getManifestFromRepo(owner, repo, auth, branch = 'master') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
headers['accept'] = 'application/vnd.github.VERSION.raw';
|
headers['accept'] = 'application/vnd.github.VERSION.raw';
|
||||||
const versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();
|
let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();
|
||||||
const base64 = JSON.parse(versionsRaw);
|
if (versionsRaw) {
|
||||||
let tmp = Buffer.from(base64['content'], 'base64').toString('ascii');
|
|
||||||
if (tmp) {
|
|
||||||
// shouldn't be needed but protects against invalid json saved with BOM
|
// shouldn't be needed but protects against invalid json saved with BOM
|
||||||
tmp = tmp.replace(/^\uFEFF/, '');
|
versionsRaw = versionsRaw.replace(/^\uFEFF/, '');
|
||||||
try {
|
try {
|
||||||
releases = JSON.parse(tmp);
|
releases = JSON.parse(versionsRaw);
|
||||||
}
|
}
|
||||||
catch (_a) {
|
catch (_a) {
|
||||||
core.debug('Invalid json');
|
core.debug('Invalid json');
|
||||||
|
Reference in New Issue
Block a user