gliderlabs/herokuish

Execute command inside bash instead of exec

DCNick3 opened this issue · 3 comments

Currently the command specified in Procfile is executed with exec, which does not seem to be in line what heroku does, as it breaks, for example, dotnetcore-buildpack (see jincod/dotnetcore-buildpack#145).

I propose to wrap the command executed in bash -c to support it:

    if [[ "$HEROKUISH_SETUIDGUID" == "false" ]]; then
        exec bash -c "$@"
    else
        exec setuidgid "$unprivileged_user" bash -c "$@"
    fi

I ran into this issue as well. @jincod was able to make a patch to fix this but working the working directory isn't proper which breaks my apps that normally run fine on heroku, thus I must manually fix that in the app itself. See this issue comment for an example.

I'm not sure why eval was used, so I'm hesitant to change process execution like that. @progrium do you remember why we use eval instead of bash -c here? 389a74e#diff-ccd15731721e777c0db64b6a0c8374c2c22c512b18f8ab156306c98b64ca44c5R21