From c5726497460845f55b74e19d9a40d5f949656499 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Wed, 25 Feb 2026 20:18:32 +0100 Subject: feat(core): add warn() and downgrade --saving-file diagnostic to warning The --saving-file without --saving condition is non-fatal, so using error() was misleading. Introduce warn() (yellow output, respects --quiet) and use it for this diagnostic instead. --- transcode.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/transcode.sh b/transcode.sh index ae53b5f..749668c 100755 --- a/transcode.sh +++ b/transcode.sh @@ -165,6 +165,14 @@ msg() { fi } +warn() { + if [[ $QUIET -eq 0 ]]; then + local mesg="$1" + shift + printf "${BOLD}${YELLOW}==>${ALL_OFF} ${BOLD}%s${ALL_OFF} %s\n" "$mesg" "$@" + fi +} + verbose() { if [[ $VERBOSE -eq 1 && $QUIET -eq 0 ]]; then local mesg="$1" @@ -580,7 +588,7 @@ if [[ $SAVING -eq 1 ]]; then fi if [[ $SAVING_FILE_EXPLICIT -eq 1 && $SAVING -eq 0 ]]; then - error "--saving-file has no effect without --saving" + warn "--saving-file has no effect without --saving" fi if [[ ! "$NICE_VALUE" =~ ^-?[0-9]+$ ]] || ((NICE_VALUE < -20 || NICE_VALUE > 19)); then -- cgit v1.3.1