mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
Fix: Suppress /dev/tty error in safe_read
This commit is contained in:
+1
-1
@@ -111,7 +111,7 @@ safe_read() {
|
||||
local input_value=""
|
||||
|
||||
echo -n "$prompt"
|
||||
if read -r input_value </dev/tty 2>/dev/null || read -r input_value 2>/dev/null; then
|
||||
if { read -r input_value </dev/tty; } 2>/dev/null || read -r input_value 2>/dev/null; then
|
||||
# Use printf instead of eval for security
|
||||
printf -v "$varname" '%s' "$input_value"
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user