Stop adding the current working directory to PATH
#1987
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently for historic reasons the buildpack adds the current working directory to
PATH, due to adding an empty colon-delimited segment before the default UbuntuPATH.This can cause errors if the app has a script/binary in its root directory that has the same name as a command the buildpack tries to run. For example, on Honeycomb I've seen internal errors when the buildpack attempts to locate the bundled pip, due to the
tailcommand being run not being the command we expected:Removing this customisation of
PATHis a breaking change, but safer in the long run (and also matches the Python CNB behaviour).Any apps that call a script or binary that's in the root directory of their app from
bin/pre_compileorbin/post_compilehook (or any other subprocess called by the buildpack) will now need to do so via an explicit relative path. For example, use./my_commandnotmy_commandwhen calling the script/binary.This change doesn't affect:
foo/my_command)./my_command)GUS-W-20472356.