injecting PHP_FOLDER environment var in bat / sh files#25
injecting PHP_FOLDER environment var in bat / sh files#25Lotti wants to merge 4 commits intohjbdev:masterfrom
Conversation
|
While I guarantee that it works for php.bat, I have doubts for php (sh) because I didn't understand why run that file under windows... the path reported in sh file doesn't match neither MINGW64 shell (e.g.: the bash shell coming with Git for Windows: /c/Users) or WSL subsystem (/mnt/c/Users). I've switched from official PHPRC environment variable to a totally custom PHP_FOLDER environment variable because PHPRC can be used to specify an alternative path for php.ini |
|
I don't think I understand the use case for this, there is a php.ini file per version so those paths can be hardcoded can't they? I might be misunderstanding |
Yes, you're right, is possible to achieve the same result by hardcoding the path in php.ini instead of hardcoding the environment variables that I'm proposing. I mostly made this feature because it is easier to hardcode an environment variable and let pvm set the right path instead of rely on users. Anyway feel free to drop it if it still feels useless to you. I'll be back with another pull request that introduces composer soon :) Thank you. |
# Conflicts: # commands/help.go # commands/use.go
Hello devs!
I made this change to inject the php directory path as environment variable. In this way is possible to use $PHP_FOLDER in php.ini configuration file. With this variable, I can set paths in php.ini relative to php directory.
e.g.: