mirror of
https://github.com/actions/setup-python.git
synced 2024-11-25 01:38:56 +00:00
updated error debugging
This commit is contained in:
parent
c4b81dc3e7
commit
996d9604f2
2 changed files with 18 additions and 18 deletions
18
dist/setup/index.js
vendored
18
dist/setup/index.js
vendored
|
@ -91637,10 +91637,10 @@ function findReleaseFromManifest(semanticVersionSpec, architecture, manifest) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (!manifest) {
|
if (!manifest) {
|
||||||
manifest = yield getManifest();
|
manifest = yield getManifest();
|
||||||
core.debug('manifest :>> ' + JSON.stringify(manifest));
|
core.info('manifest :>> ' + JSON.stringify(manifest));
|
||||||
}
|
}
|
||||||
const foundRelease = yield tc.findFromManifest(semanticVersionSpec, false, manifest, architecture);
|
const foundRelease = yield tc.findFromManifest(semanticVersionSpec, false, manifest, architecture);
|
||||||
core.debug(`Found release: ${JSON.stringify(foundRelease)}`);
|
core.info(`Found release: ${JSON.stringify(foundRelease)}`);
|
||||||
return foundRelease;
|
return foundRelease;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -91649,25 +91649,25 @@ function getManifest() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
const manifestFromRepo = yield getManifestFromRepo();
|
const manifestFromRepo = yield getManifestFromRepo();
|
||||||
core.debug('Successfully fetched the manifest from the repo.');
|
core.info('Successfully fetched the manifest from the repo.');
|
||||||
core.debug(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`);
|
core.info(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`);
|
||||||
return manifestFromRepo;
|
return manifestFromRepo;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
core.debug('Fetching the manifest via the API failed.');
|
core.info('Fetching the manifest via the API failed.');
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
core.debug(err.message);
|
core.info(err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const manifestFromURL = yield getManifestFromURL();
|
const manifestFromURL = yield getManifestFromURL();
|
||||||
core.debug('Successfully fetched the manifest from the URL.');
|
core.info('Successfully fetched the manifest from the URL.');
|
||||||
core.debug(`Manifest from URL: ${JSON.stringify(manifestFromURL)}`);
|
core.info(`Manifest from URL: ${JSON.stringify(manifestFromURL)}`);
|
||||||
return manifestFromURL;
|
return manifestFromURL;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.getManifest = getManifest;
|
exports.getManifest = getManifest;
|
||||||
function getManifestFromRepo() {
|
function getManifestFromRepo() {
|
||||||
core.debug(`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`);
|
core.info(`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`);
|
||||||
return tc.getManifestFromRepo(MANIFEST_REPO_OWNER, MANIFEST_REPO_NAME, AUTH, MANIFEST_REPO_BRANCH);
|
return tc.getManifestFromRepo(MANIFEST_REPO_OWNER, MANIFEST_REPO_NAME, AUTH, MANIFEST_REPO_BRANCH);
|
||||||
}
|
}
|
||||||
exports.getManifestFromRepo = getManifestFromRepo;
|
exports.getManifestFromRepo = getManifestFromRepo;
|
||||||
|
|
|
@ -20,7 +20,7 @@ export async function findReleaseFromManifest(
|
||||||
): Promise<tc.IToolRelease | undefined> {
|
): Promise<tc.IToolRelease | undefined> {
|
||||||
if (!manifest) {
|
if (!manifest) {
|
||||||
manifest = await getManifest();
|
manifest = await getManifest();
|
||||||
core.debug('manifest :>> ' + JSON.stringify(manifest));
|
core.info('manifest :>> ' + JSON.stringify(manifest));
|
||||||
}
|
}
|
||||||
|
|
||||||
const foundRelease = await tc.findFromManifest(
|
const foundRelease = await tc.findFromManifest(
|
||||||
|
@ -29,30 +29,30 @@ export async function findReleaseFromManifest(
|
||||||
manifest,
|
manifest,
|
||||||
architecture
|
architecture
|
||||||
);
|
);
|
||||||
core.debug(`Found release: ${JSON.stringify(foundRelease)}`);
|
core.info(`Found release: ${JSON.stringify(foundRelease)}`);
|
||||||
return foundRelease;
|
return foundRelease;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getManifest(): Promise<tc.IToolRelease[]> {
|
export async function getManifest(): Promise<tc.IToolRelease[]> {
|
||||||
try {
|
try {
|
||||||
const manifestFromRepo = await getManifestFromRepo();
|
const manifestFromRepo = await getManifestFromRepo();
|
||||||
core.debug('Successfully fetched the manifest from the repo.');
|
core.info('Successfully fetched the manifest from the repo.');
|
||||||
core.debug(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`);
|
core.info(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`);
|
||||||
return manifestFromRepo;
|
return manifestFromRepo;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.debug('Fetching the manifest via the API failed.');
|
core.info('Fetching the manifest via the API failed.');
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
core.debug(err.message);
|
core.info(err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const manifestFromURL = await getManifestFromURL();
|
const manifestFromURL = await getManifestFromURL();
|
||||||
core.debug('Successfully fetched the manifest from the URL.');
|
core.info('Successfully fetched the manifest from the URL.');
|
||||||
core.debug(`Manifest from URL: ${JSON.stringify(manifestFromURL)}`);
|
core.info(`Manifest from URL: ${JSON.stringify(manifestFromURL)}`);
|
||||||
return manifestFromURL;
|
return manifestFromURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getManifestFromRepo(): Promise<tc.IToolRelease[]> {
|
export function getManifestFromRepo(): Promise<tc.IToolRelease[]> {
|
||||||
core.debug(
|
core.info(
|
||||||
`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`
|
`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`
|
||||||
);
|
);
|
||||||
return tc.getManifestFromRepo(
|
return tc.getManifestFromRepo(
|
||||||
|
|
Loading…
Reference in a new issue