Skip to content

Commit b529c94

Browse files
committed
Fix: pypr when no nc or socat command
Fix #1170 (reply in thread)
1 parent 151391e commit b529c94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Configs/.local/bin/hyde-shell

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,12 @@ run_pypr() {
467467
if [[ -S "$socket_path" ]] && pgrep -u "$USER" pypr >/dev/null 2>&1; then
468468
message="${*:-"help"}"
469469
# Send the message to the socket and print the response
470-
if ! printf "%s" "${message[@]}" | nc -N -U "$socket_path"; then
471-
if ! printf "%s" "${message[@]}" | socat - UNIX-CONNECT:"$socket_path"; then
470+
if ! printf "%s" "${message[@]}" | nc -N -U "$socket_path" 2>/dev/null; then
471+
if ! printf "%s" "${message[@]}" | socat - UNIX-CONNECT:"$socket_path" 2>/dev/null; then
472+
if ! pypr "${message[@]}"; then
472473
print_log -sec "pypr" "Error communicating with socket: $socket_path"
473474
exit 1
475+
fi
474476
fi
475477

476478
fi

0 commit comments

Comments
 (0)