rails-sqlserver / heroku-buildpack-freetds

This is a Heroku buildpack for vendoring the FreeTDS binaries into your project.
MIT License
10 stars 31 forks source link

$PATH should be escaped #13

Closed kwlockwo closed 1 year ago

kwlockwo commented 4 years ago

https://github.com/rails-sqlserver/heroku-buildpack-freetds/blob/master/bin/compile#L86 $PATH should be escaped otherwise the PATH expanded at the .profile.d script is created rather than when the script runs on the dyno booting.

This is causing the PATH to be set at the time the .profile.d the script runs to be lost.

kwlockwo commented 4 years ago

Pretty sure this is not the only instance of a variable having this issue. LD_LIBRARY_PATH will also have the same problem.

gaffneyc commented 4 years ago

I opened #12 last week which fixes $PATH at least. I think you're right that LD_LIBRARY_PATH (and LD_RUN_PATH and LIBRARY_PATH) will all get clobbered though I'm not sure how common those are.

kwlockwo commented 4 years ago

I have seen LIBRARY_PATH used, LD_RUN_PATH not so much. Should be escaped all the same.

schneems commented 2 years ago

There's a larger issue where the PATH from build time are being picked up and preserved into runtime even though the two have different path structures https://github.com/rails-sqlserver/heroku-buildpack-freetds/issues/17

bf4 commented 1 year ago

@metaskills I think this issue is collecting some good potential collaborators :) Anyone want commit?

bf4 commented 1 year ago

Closed by https://github.com/rails-sqlserver/heroku-buildpack-freetds/pull/21