I'm running a shell script to execute composer install command.
my composer.json file is in /var/www/html
Is there a way I can tell composer not to run under the current directory and to run the composer.json in /var/www/html ?
This is what i've done - but it feels wrong:
cd /var/www/html && composer install
You can change directory to /var/www/html and then do the composer install like so:
cd /var/www/html && composer install
UPDATE
Actually a better way to do it would be using --working-dir or -d option.
composer install -d=/var/www/html
or
composer install --working-dir=/var/www/html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With