mirror of
https://gitcode.com/gh_mirrors/se/setup-uv.git
synced 2026-07-04 02:50:55 +00:00
a92cb43098
## 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;
|