-
Notifications
You must be signed in to change notification settings - Fork 48
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
Composer:install should accept an optional directory/path argument #26
Comments
What about just setting |
Ah, that should do it…. but at the moment isn’t. Which confuses me. Almost certainly an error on my end, though. Thanks for the knowledge :) Callum Kerr 201 Main Street, Suite 206 On Aug 29, 2014, at 4:02 PM, Scott Walkinshaw notifications@github.com wrote:
|
Ok, I've done some tinkering and now have things working with --working-dir, but there are still some niggles, which I'll lay out: # deploy/staging.rb
set :composer_install_flags, "--no-interaction --optimize-autoloader --working-dir=#{release_path}/content/plugins/timber" At the point at which the composer install task runs, after "deploy:updated", the above path resolves to: Note the So when the composer install task runs, it runs in the I have worked around this as so: # deploy.rb
Rake::Task['deploy:updated'].prerequisites.delete('composer:install')
after "deploy:published", "composer:install" (Because after deploy:published, release_path resolves to the correct path) But I'm sure I'm missing something. Am I looking at the wrong variable for the correctly resolved release_path? |
Capistrano doesn't have the best docs on this, but you need to use a lambda function ( set :composer_install_flags, -> { "--no-interaction --optimize-autoloader --working-dir=#{fetch(:release_path)}/content/plugins/timber" } That should hopefully solve it. |
Yes, this was it. Thank you kindly, sir! 201 Main Street, Suite 206 On Sep 2, 2014, at 10:10 AM, Scott Walkinshaw notifications@github.com wrote:
|
In my use case, I have a submodule that manages its dependencies with
composer. Currently,
composer:install
is hard-coded to runwithin
release_path
, which fails, with no option to change directories, ascomposer
cannot find a suitablecomposer.json
. Allowing the user tospecify an execution path for the install command would be most helpful!
The text was updated successfully, but these errors were encountered: