We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18a26d3 commit 905ed72Copy full SHA for 905ed72
1 file changed
scripts/snap-pac
@@ -25,7 +25,12 @@ set -o errtrace
25
readonly argv0="snap-pac"
26
readonly SNAPPAC_CONFIG_FILE=/etc/snap-pac.conf
27
readonly SNAPPER_CONFIG_FILE=/etc/conf.d/snapper
28
-readonly pacman_cmd="$(ps -q $(ps -p "$$" -o ppid=) -o args=)"
+if [ -z $PPID ] || [ -z $(ps -q $PPID -o args=) ]; then
29
+ printf "Parent process ID is empty.\n"
30
+ readonly pacman_cmd=""
31
+else
32
+ readonly pacman_cmd="$(ps -q $PPID -o args=)"
33
+fi
34
readonly pre_or_post=$1
35
36
out() { printf "$1 $2\n" "${@:3}"; }
0 commit comments