gamemode-session: discard effect-command stdout
makoctl/fw-fanctrl echo confirmations to stdout that leaked into add/del output during integration. run() now discards stdout, keeps stderr. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,10 @@ FAN_AUTO="${XDG_STATE_HOME:-$HOME/.local/state}/fan-profile-auto"
|
||||
DRYRUN="${GAMEMODE_DRYRUN:-0}"
|
||||
|
||||
log() { printf 'gamemode: %s\n' "$*" >&2; }
|
||||
run() { if [ "$DRYRUN" = 1 ]; then log "would: $*"; else "$@"; fi; }
|
||||
# Execute a side-effecting command (or log it under dryrun). Its stdout is
|
||||
# discarded — effect tools like makoctl/fw-fanctrl print confirmations we don't
|
||||
# want leaking into `add`/`del` output; stderr is kept so real errors surface.
|
||||
run() { if [ "$DRYRUN" = 1 ]; then log "would: $*"; else "$@" >/dev/null; fi; }
|
||||
|
||||
is_active() {
|
||||
[ -n "$(find "$STATE_DIR" -maxdepth 1 -name 'src.*' -print -quit 2>/dev/null)" ]
|
||||
|
||||
Reference in New Issue
Block a user