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

Impossible to save a package if installed previously #104

Closed
mikeSimonson opened this issue Jan 7, 2015 · 7 comments · Fixed by #105
Closed

Impossible to save a package if installed previously #104

mikeSimonson opened this issue Jan 7, 2015 · 7 comments · Fixed by #105
Labels

Comments

@mikeSimonson
Copy link
Contributor

If you want to save a package that you have already installed with bowerphp install jquery-address.
It will fail because there is a check for that in bowerphp.php line 100.

Not sure what the best approach is in this case ?

@garak
Copy link
Member

garak commented Jan 8, 2015

Bower does just the same: if a package is already installed, it's not installed again.

@mikeSimonson
Copy link
Contributor Author

It's right that it does not install it again but it should add it in the bower.json

@garak
Copy link
Member

garak commented Jan 9, 2015

No. There is no implicit adding in bower.json, you need to use -S flag

@mikeSimonson
Copy link
Contributor Author

I know.
The problem is that it won't add it to the bower.json when using bowerphp install -S jquery-address, if that package has already been installed previously using bowerphp install jquery-address.

The bug is that the -S option doesn't work if the package is already installed.

Maybe the easiest/cleanest fix is just to check for the -S option before to try to install ?

@garak garak added the bug label Jan 9, 2015
@mikeSimonson
Copy link
Contributor Author

The problem is that it returns on line 104 if the package is already installed with the same version. That's before it's checking for the -S option on line 116.

@mikeSimonson
Copy link
Contributor Author

I have to check but I also have the impression that the version in bower.json file won't be updated if a package is updated.

mikeSimonson added a commit to mikeSimonson/bowerphp that referenced this issue Jan 9, 2015
…talled

Previously if a package was already installed in the right version, saving it
in the bower.json was not possible because of an early exit.

Correcting also a little side effect of the change of execution order.

Fix Bee-Lab#104
@mikeSimonson
Copy link
Contributor Author

Well my remark about the update command make no sense. As it will only update depending on the version requirements.

mikeSimonson added a commit to mikeSimonson/bowerphp that referenced this issue Jan 11, 2015
…talled

Previously if a package was already installed in the right version, saving it
in the bower.json was not possible because of an early exit.

Correcting also a little side effect of the change of execution order.

Fix Bee-Lab#104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants