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

Do not try to re-install same PhantomJS version #17

Closed
igorsantos07 opened this issue Jun 10, 2015 · 8 comments
Closed

Do not try to re-install same PhantomJS version #17

igorsantos07 opened this issue Jun 10, 2015 · 8 comments

Comments

@igorsantos07
Copy link

I've noticed that, after the first install, the scripts try to install again the same PhantomJS binary every time we mess around with Composer. Would be better if it noticed there was no need to update anything, and skip that procedure.

@jakoch
Copy link
Owner

jakoch commented Jun 10, 2015

Yes, the file is downloaded to the cache and overwritten from the cache each time.
So, it's constantly overwriting on installation or update.
There is no version comparison in place (so it doesn't know if it's a new version or not).

  • add "if file exists & same as in cache, skip copying"

@vesper8
Copy link

vesper8 commented Apr 3, 2016

+1

@iainp999
Copy link

Another +1 here

@InputOutput
Copy link

yes please +1

@jakoch
Copy link
Owner

jakoch commented Jun 27, 2016

Ok, i've added a version comparison between the requested version and the already installed version.

The installation of PhantomJS is skipped (on a second run of the installer), when the installed version is lower or equal to the version you are trying to install.
Or in other words: only a newer version will be installed, if PhantomJS is already installed.

The changes are on the dev-master branch. (It's prepared as 2.1.1-p04 tag, but not tagged, yet.)

It would be nice, if you find the time to test this and provide some feedback.

Best, Jens

@InputOutput
Copy link

Sure I'll give it a run

@InputOutput
Copy link

Looking good!

vagrant@backend:~/kaartje2go.nl/app$ composer update

[blablabla]

PhantomInstaller\Installer::installPhantomJS

  • PhantomJS v2.1.1 is already installed. Skipping the installation.

vagrant@backend:~/kaartje2go.nl/app$ composer install

[blablabla]

PhantomInstaller\Installer::installPhantomJS

  • PhantomJS v2.1.1 is already installed. Skipping the installation.
    vagrant@backend:~/kaartje2go.nl/app$

jakoch added a commit that referenced this issue Jun 27, 2016
updating readme version for easier copy-pasteing

issue #17
@jakoch
Copy link
Owner

jakoch commented Jun 27, 2016

Thank you for the quick feedback!
Let's tag it...

The new version is 2.1.1-p04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants