Fix $PATH explicitly in Docker shims

This commit is contained in:
Radon Rosborough 2020-12-30 15:05:56 -08:00
parent eaf9365074
commit 6ac8623216
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,8 @@
set -euo pipefail
export PATH="$(sed -E 's/:bin:/:/; s/(^|:)bin(:|$)//' <<< "${PATH}")"
if [[ "${OSTYPE:-}" != darwin* ]] && [[ "${EUID}" != 0 ]]; then
exec sudo -E docker "$@"
else

View File

@ -2,6 +2,8 @@
set -euo pipefail
export PATH="$(sed -E 's/:bin:/:/; s/(^|:)bin(:|$)//' <<< "${PATH}")"
if [[ "${OSTYPE:-}" != darwin* ]] && [[ "${EUID}" != 0 ]]; then
exec sudo -E skopeo "$@"
else