Heroku的Windows工具带和LD_LIBRARY_PATH [英] Heroku's Windows toolbelt and LD_LIBRARY_PATH
问题描述
我在Heroku上部署了一个PHP应用程序,我需要使用CLI来运行一些任务。
为了做到这一点,我必须使用以下命令设置LD_LIBRARY_PATH env变量:
heroku config:add LD_LIBRARY_PATH = / app / php / ext:/ app / apache / lib
但是每次我这样做时,toolbelt都会覆盖命令,变量指向 C:\程序文件(x86)\Git\app\php\\ \\ ext; C:\程序文件(x86)\Git\app\apache\lib
。显然它不好。有没有人有任何想法如何正确地做到这一点?
heroku config:add LD_LIBRARY_PATH = // app / php / ext:// app / apache / lib
在Linux上使用路径时,这不会造成问题。
I'm deploying a PHP application on Heroku and I need to run some tasks using CLI.
In order to do that I have to set LD_LIBRARY_PATH env variable using this command:
heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib
but every time I do it toolbelt overrides the command and the variable points to C:\Program Files (x86)\Git\app\php\ext;C:\Program Files (x86)\Git\app\apache\lib
. Obviously it's not okay. Does anyone have any ideas how to do this in proper way?
This is actually not a problem with Heroku toolbelt, it's documented behavior by msys (I'm assuming you're running this in the msysgit shell). You can either run the command in a different shell (eg. Powershell) or use '//' at the start of the path like this:
heroku config:add LD_LIBRARY_PATH=//app/php/ext://app/apache/lib
This won't cause problems when the path is used on Linux.
这篇关于Heroku的Windows工具带和LD_LIBRARY_PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!