From a31b9831cc763613185c51e2c23ba2579dbddddb Mon Sep 17 00:00:00 2001 From: Tirthraj Raval Date: Sun, 12 Jul 2026 17:42:22 +0530 Subject: [PATCH] fix(set-mix): Updated the flag to make it work correctly. - The set mix flag can now be used for changing the pokemon ANSI mixing behaviour on terminal startup. - The flag can be simply set using hypercar-colorscripts --set-mix off/on --- cli/install.sh | 12 +++++++----- cli/internal/cmd/root.go | 22 ++++++++++++---------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/cli/install.sh b/cli/install.sh index a45e561..eaddfbc 100755 --- a/cli/install.sh +++ b/cli/install.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# install.sh — installer for hypercar-colorscripts (v0.3.2) +# install.sh — installer for hypercar-colorscripts (v0.3.3) # -# Removed: shell tab completion installation (bash/zsh/fish). -# Everything else preserved from v0.3.1. +# Fixes: pokemon_mix now written as a proper JSON boolean (not a quoted +# string), matching the *bool schema the Go binary expects to unmarshal. # # Flags: # --system binary -> /usr/local/bin (sudo) @@ -61,9 +61,9 @@ if command -v pokemon-colorscripts >/dev/null 2>&1; then ok "pokemon-colorscripts detected at $(command -v pokemon-colorscripts)" fi -# 2. Build +# 2. Build (always rebuild — Go caches internally, this is cheap) step "2/8 Binary" -[[ -x "$SCRIPT_DIR/$BINARY" ]] || (cd "$SCRIPT_DIR" && make build) || fail "make build failed" +(cd "$SCRIPT_DIR" && make build) || fail "make build failed" ok "$SCRIPT_DIR/$BINARY" # 3. Source data @@ -140,6 +140,8 @@ else fi ok "Assets in $DATA_DIR" +# Note: pokemon_mix is written as an unquoted JSON boolean (true/false). +# Any other quoting will break unmarshaling in Go and revert to default (true). mkdir -p "$CONFIG_DIR" cat > "$CONFIG_FILE" <