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

add bin command for composer install --no-dev #45

Merged
merged 1 commit into from
Mar 17, 2019

Conversation

Kanti
Copy link
Contributor

@Kanti Kanti commented Mar 8, 2019

If composer require --dev bamarni/composer-bin-plugin was used to install this Plugin.
and the Auto-installation scripts are installed in the composer.json, then the composer install --no-dev throws n error.

With this change in the composer.json the error goes away

@theofidry
Copy link
Collaborator

Sorry I'm not sure to follow, could you expand a bit more on the actual problem & fix?

@Kanti
Copy link
Contributor Author

Kanti commented Mar 8, 2019

no problem:
Steps to reproduce the Problem:

mkdir test && cd test
composer require --dev bamarni/composer-bin-plugin
composer config scripts.post-install-cmd '@composer bin all install --ansi'
composer config scripts.post-update-cmd '@composer bin all update --ansi'
composer install --no-dev

The output:

Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files


  [Symfony\Component\Console\Exception\CommandNotFoundException]
  Command "bin" is not defined.


Script @composer bin all install --ansi handling the post-install-cmd event returned with error code 1

Solution:

composer config scripts.bin "echo 'bin not installed'"
composer install --no-dev

Output:

Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files
> echo 'bin not installed' 'all' 'install'
bin not installed all install

@Kanti
Copy link
Contributor Author

Kanti commented Mar 17, 2019

hi @theofidry did the example help to understand my problem?

@theofidry theofidry merged commit 67f9d31 into bamarni:master Mar 17, 2019
@theofidry
Copy link
Collaborator

theofidry commented Mar 17, 2019

All good, sorry I just needed time to check it :)

Thanks for the PR!

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

Successfully merging this pull request may close these issues.

2 participants