mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
kitty_tests, shell-integration: rework getpwuid() exceptions suppression
This commit is contained in:
parent
5f9b520ca0
commit
08fa7f19f7
3 changed files with 4 additions and 5 deletions
|
|
@ -67,7 +67,7 @@ using_id() {
|
|||
}
|
||||
|
||||
using_python() {
|
||||
detect_python && output=$(command "$python" -c "import pwd, os; print(pwd.getpwuid(os.geteuid()).pw_shell)") \
|
||||
detect_python && output=$(command "$python" -c "import pwd, os; exec(\"try:print(pwd.getpwuid(os.geteuid()).pw_shell)\nexcept:print(os.environ.get('SHELL')or'/bin/sh')\")") \
|
||||
&& login_shell="$output" && login_shell_is_ok
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue