Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$PATH with grunt exec #87

Open
ulicodex opened this issue Sep 12, 2018 · 1 comment
Open

$PATH with grunt exec #87

ulicodex opened this issue Sep 12, 2018 · 1 comment

Comments

@ulicodex
Copy link

ulicodex commented Sep 12, 2018

grunt does not seem to take the $PATH variable into account. At least in Magento 2 when starting:
grunt exec:<theme> PHP from /usr/bin/php is used instead of the first PHP found in $PATH.

@gwicksted
Copy link
Collaborator

few things to check: inside of nodejs, (if you can put in a console.log in your grunt script that would be ideal) what is the output from console.log(process.cwd()); and console.log(process.env.PATH);. Also, under the same user grunt -- which is probably the user Magento is executing under ... likely apache/nginx's user -- type which php (which you could try executing via grunt-exec). My bet is, either it needs to be run with bash (see options.shell in the readme for grunt-exec) to load the ~/.bashrc containing the path export... or a different $PATH is defined for your user than the one Magento is running under which can likely be found by ps aux | egrep '(apache|httpd|nginx)'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants