fix(tests): redirect stdin from /dev/null in uninstall test to prevent hang
--uninstall prompts for config removal when stdin is a TTY. Running the test from an interactive terminal caused it to block on read. Feeding /dev/null forces the non-interactive path without changing behaviour.
This commit is contained in:
+1
-1
@@ -259,7 +259,7 @@ fi
|
|||||||
|
|
||||||
# 16. Uninstall — removes installed files, config is kept in non-interactive mode
|
# 16. Uninstall — removes installed files, config is kept in non-interactive mode
|
||||||
it "uninstalls installed files (keeps config)"
|
it "uninstalls installed files (keeps config)"
|
||||||
uninstall_out=$("$COLOR_TOOL" --uninstall 2>&1)
|
uninstall_out=$("$COLOR_TOOL" --uninstall </dev/null 2>&1)
|
||||||
if [[ ! -e "$HOME/.local/bin/color-tool" ]] &&
|
if [[ ! -e "$HOME/.local/bin/color-tool" ]] &&
|
||||||
[[ ! -L "$HOME/.local/bin/color-tool" ]] &&
|
[[ ! -L "$HOME/.local/bin/color-tool" ]] &&
|
||||||
[[ ! -d "$XDG_DATA_HOME/color-tool" ]] &&
|
[[ ! -d "$XDG_DATA_HOME/color-tool" ]] &&
|
||||||
|
|||||||
Reference in New Issue
Block a user