@@ -91388,11 +91388,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9138891388 });
9138991389};
9139091390Object.defineProperty(exports, "__esModule", ({ value: true }));
91391- exports.installCpythonFromRelease = exports.getManifest = exports.findReleaseFromManifest = exports.MANIFEST_URL = void 0;
91391+ exports.installCpythonFromRelease = exports.getManifestFromURL = exports.getManifestFromRepo = exports. getManifest = exports.findReleaseFromManifest = exports.MANIFEST_URL = void 0;
9139291392const path = __importStar(__nccwpck_require__(1017));
9139391393const core = __importStar(__nccwpck_require__(2186));
9139491394const tc = __importStar(__nccwpck_require__(7784));
9139591395const exec = __importStar(__nccwpck_require__(1514));
91396+ const httpm = __importStar(__nccwpck_require__(6255));
9139691397const utils_1 = __nccwpck_require__(1314);
9139791398const TOKEN = core.getInput('token');
9139891399const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
@@ -91411,10 +91412,37 @@ function findReleaseFromManifest(semanticVersionSpec, architecture, manifest) {
9141191412}
9141291413exports.findReleaseFromManifest = findReleaseFromManifest;
9141391414function getManifest() {
91415+ return __awaiter(this, void 0, void 0, function* () {
91416+ try {
91417+ return yield getManifestFromRepo();
91418+ }
91419+ catch (err) {
91420+ core.debug('Fetching the manifest via the API failed.');
91421+ if (err instanceof Error) {
91422+ core.debug(err.message);
91423+ }
91424+ }
91425+ return yield getManifestFromURL();
91426+ });
91427+ }
91428+ exports.getManifest = getManifest;
91429+ function getManifestFromRepo() {
9141491430 core.debug(`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`);
9141591431 return tc.getManifestFromRepo(MANIFEST_REPO_OWNER, MANIFEST_REPO_NAME, AUTH, MANIFEST_REPO_BRANCH);
9141691432}
91417- exports.getManifest = getManifest;
91433+ exports.getManifestFromRepo = getManifestFromRepo;
91434+ function getManifestFromURL() {
91435+ return __awaiter(this, void 0, void 0, function* () {
91436+ core.debug('Falling back to fetching the manifest using raw URL.');
91437+ const http = new httpm.HttpClient('tool-cache');
91438+ const response = yield http.getJson(exports.MANIFEST_URL);
91439+ if (!response.result) {
91440+ throw new Error(`Unable to get manifest from ${exports.MANIFEST_URL}`);
91441+ }
91442+ return response.result;
91443+ });
91444+ }
91445+ exports.getManifestFromURL = getManifestFromURL;
9141891446function installPython(workingDirectory) {
9141991447 return __awaiter(this, void 0, void 0, function* () {
9142091448 const options = {
0 commit comments