Term: Break from loop if PPID can't be accessed/not found
This commit is contained in:
parent
ab1e05adff
commit
c7c84fcbba
1 changed files with 1 additions and 0 deletions
1
neofetch
1
neofetch
|
@ -1652,6 +1652,7 @@ get_term() {
|
||||||
term="$SSH_TTY"
|
term="$SSH_TTY"
|
||||||
else
|
else
|
||||||
parent="$(get_ppid "$parent")"
|
parent="$(get_ppid "$parent")"
|
||||||
|
[[ -z "$parent" ]] && break
|
||||||
name="$(get_process_name "$parent")"
|
name="$(get_process_name "$parent")"
|
||||||
case "${name// }" in
|
case "${name// }" in
|
||||||
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
||||||
|
|
Loading…
Reference in a new issue