Skip to content

Commit

Permalink
fix: add --preserve-env=PATH to sudo command
Browse files Browse the repository at this point in the history
This ensures that Nomad inherits the current user's PATH environment variable,
rather that the default sudo behavior of using a sanitized PATH.

This is necessary because the user may have installed bindle-server, traefik,
etc. locally but not system-wide. For example, cargo install installs in the
current user's home directory by default.

Signed-off-by: Joel Dice <joel.dice@gmail.com>
  • Loading branch information
dicej committed Jun 13, 2022
1 parent 0193273 commit f97986f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local/quick-start/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ consul agent -dev \
# https://github.com/deislabs/hippo/blob/de73ae52d606c0a2351f90069e96acea831281bc/src/Infrastructure/Jobs/NomadJob.cs#L28
# https://www.nomadproject.io/docs/drivers/exec#client-requirements
case "$OSTYPE" in
linux*) SUDO=sudo ;;
linux*) SUDO="sudo --preserve-env=PATH" ;;
*) SUDO= ;;
esac

Expand Down

0 comments on commit f97986f

Please sign in to comment.