mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-09 05:14:27 +00:00
fix: explicitly allow preservation for TERMINFO in shell-integration
Due to security issues, `sudo` implementations may not preserve environment variables unless appended with `--preserve-env=list`. Signed-off-by: definfo <hjsdbb1@gmail.com>
This commit is contained in:
@@ -103,7 +103,7 @@ if [[ "$GHOSTTY_SHELL_FEATURES" == *"sudo"* && -n "$TERMINFO" ]]; then
|
||||
if [[ "$sudo_has_sudoedit_flags" == "yes" ]]; then
|
||||
builtin command sudo "$@";
|
||||
else
|
||||
builtin command sudo TERMINFO="$TERMINFO" "$@";
|
||||
builtin command sudo --preserve-env=TERMINFO "$@";
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user