Skip to content

Commit

Permalink
Merge pull request #1182 from gliderlabs/invert-chown
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez authored Apr 1, 2024
2 parents 88914c8 + 61febc6 commit 86b7767
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/procfile.bash
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ procfile-load-profile() {
done
if [[ -d "$app_path/.profile.d" ]]; then
# shellcheck disable=SC2154
chown "$unprivileged_user:$unprivileged_group" "$app_path/.profile.d"
if [[ "$HEROKUISH_DISABLE_CHOWN" != "true" ]]; then
chown "$unprivileged_user:$unprivileged_group" "$app_path/.profile.d"
fi
for file in "$app_path/.profile.d"/*.sh; do
# shellcheck disable=SC1090
source "$file"
Expand All @@ -123,7 +125,7 @@ procfile-setup-home() {
# shellcheck disable=SC2154
usermod --home "$app_path" "$unprivileged_user" >/dev/null 2>&1
# shellcheck disable=SC2154
if [[ "$HEROKUISH_DISABLE_CHOWN" == "true" ]]; then
if [[ "$HEROKUISH_DISABLE_CHOWN" != "true" ]]; then
chown "$unprivileged_user:$unprivileged_group" "$app_path"
# unprivileged_user & unprivileged_group are defined in outer scope
# shellcheck disable=SC2154
Expand Down

0 comments on commit 86b7767

Please sign in to comment.