mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-06-09 11:30:42 +00:00
Add quiet input to suppress info-level log output (#898)
## Summary Adds a new `quiet` input (default: `false`) that suppresses `info`-level log output when set to `true`. Only warnings and errors are shown. Contributes to: #868
This commit is contained in:
committed by
GitHub
parent
e07f2ac4b7
commit
a92cb43098
@@ -8,6 +8,7 @@ import {
|
||||
TOOL_CACHE_NAME,
|
||||
VERSIONS_MANIFEST_URL,
|
||||
} from "../utils/constants";
|
||||
import * as log from "../utils/logging";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
import { validateChecksum } from "./checksum/checksum";
|
||||
import { getArtifact } from "./manifest";
|
||||
@@ -73,7 +74,7 @@ export async function downloadVersion(
|
||||
throw err;
|
||||
}
|
||||
|
||||
core.warning(
|
||||
log.warning(
|
||||
`Failed to download from mirror, falling back to GitHub Releases: ${(err as Error).message}`,
|
||||
);
|
||||
|
||||
@@ -123,7 +124,7 @@ async function downloadArtifact(
|
||||
checksum: string | undefined,
|
||||
githubToken: string | undefined,
|
||||
): Promise<{ version: string; cachedToolDir: string }> {
|
||||
core.info(`Downloading uv from "${downloadUrl}" ...`);
|
||||
log.info(`Downloading uv from "${downloadUrl}" ...`);
|
||||
const downloadPath = await tc.downloadTool(
|
||||
downloadUrl,
|
||||
undefined,
|
||||
@@ -139,7 +140,7 @@ async function downloadArtifact(
|
||||
// so this may fail if another tar, like gnu tar, ends up being used.
|
||||
uvDir = await tc.extractTar(downloadPath, undefined, "x");
|
||||
} catch (err) {
|
||||
core.info(
|
||||
log.info(
|
||||
`Extracting with tar failed, falling back to zip extraction: ${(err as Error).message}`,
|
||||
);
|
||||
const extension = getExtension(platform);
|
||||
|
||||
Reference in New Issue
Block a user