Increase the priority of user-defined PATH

This commit is contained in:
Kron4ek 2021-03-29 18:58:27 +05:00 committed by GitHub
parent 8c4e89430b
commit b126b8aaff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ working_dir=/tmp/"$(basename "${script}")"_"$(id -un)"_$RANDOM
# a problem with mounting the squashfs image due to an incorrectly calculated offset. # a problem with mounting the squashfs image due to an incorrectly calculated offset.
# The size of this script # The size of this script
scriptsize=6575 scriptsize=6699
# The size of the utils.tar archive # The size of the utils.tar archive
# utils.tar contains bwrap and squashfuse binaries # utils.tar contains bwrap and squashfuse binaries
@ -174,10 +174,11 @@ run_bwrap () {
--ro-bind-try /etc/nsswitch.conf /etc/nsswitch.conf \ --ro-bind-try /etc/nsswitch.conf /etc/nsswitch.conf \
--ro-bind-try /etc/passwd /etc/passwd \ --ro-bind-try /etc/passwd /etc/passwd \
--ro-bind-try /etc/group /etc/group \ --ro-bind-try /etc/group /etc/group \
--ro-bind-try /etc/hostname /etc/hostname \
--proc /proc \ --proc /proc \
--ro-bind-try /usr/local /usr/local \ --ro-bind-try /usr/local /usr/local \
${dirs} ${net} \ ${dirs} ${net} \
--setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:${PATH}" \ --setenv PATH "${PATH}:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin" \
"$@" "$@"
} }