-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add user option to composer::project #11
Conversation
I had to drop |
@@ -82,12 +86,17 @@ | |||
$create_project_opts = join(flatten([$dev_opt, "--prefer-${prefer}"]), ' ') | |||
$install_opts = join(flatten([$dev_opt, $script_opt, $custom_inst_opt, "--prefer-${prefer}" ]), ' ') | |||
$update_opts = join(flatten([$dev_opt, $script_opt, $custom_inst_opt, "--prefer-${prefer}", $lock_opt ]), ' ') | |||
$home_directory = $user ? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd simply allow this to be passed, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd cause a lot of headaches since a composer command executed as non-root must have write access to $target
, otherwise an error occurs. I'd suggest adding a $composer_home
option instead which sets COMPOSER_HOME
. But that's something for a different PR.
the tests are failing because composer::params isn't evaluated (before they are running) you could do that with: let :pre_condition do
'include "composer"'
end in spec/defines/project_spec.rb. that should force the evaluation of composer::params before the tests are run. |
Although this would allow using |
2b19e77
to
efcb722
Compare
This option allows for setting a specific user to create composer projects with. This is useful e.g. to have a SSH key of a user used for Git clones. Fixes Brainsware#10
efcb722
to
23aff19
Compare
agreed. let's merge this for now, and then clean it up properly. |
Add user option to composer::project
This option allows for setting a specific user to create composer projects
with. This is useful e.g. to have a SSH key of a user used for Git clones.
Fixes #10