mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-06-05 03:16:29 +00:00
## 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
22 lines
439 B
TypeScript
22 lines
439 B
TypeScript
import * as core from "@actions/core";
|
|
|
|
let quiet: boolean | undefined;
|
|
|
|
function isQuiet(): boolean {
|
|
if (quiet === undefined) {
|
|
quiet =
|
|
typeof core.getInput === "function" && core.getInput("quiet") === "true";
|
|
}
|
|
return quiet;
|
|
}
|
|
|
|
export function info(msg: string): void {
|
|
if (!isQuiet()) {
|
|
core.info(msg);
|
|
}
|
|
}
|
|
|
|
export const warning = core.warning;
|
|
export const error = core.error;
|
|
export const debug = core.debug;
|