-
Notifications
You must be signed in to change notification settings - Fork 37
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
Improved install phantomjs #82
Conversation
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.
It would be better if install_phantomjs
checked not just for the presence of phantomjs, but also the version. If phantomjs is not present or if it is an older version, then install it. (Using force=TRUE
still always install it.)
@wch thanks. I'll add in a version check. |
@wch I've added in the version check. To do so, I've created three internal functions:
|
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.
A few minor things, but otherwise it looks good.
@wch ready for round 3. |
R/utils.R
Outdated
|
||
if (is_phantomjs_version_latest(version) && !force) { | ||
message('It seems that the installed version of `phantomjs` is the latest. ', | ||
'To reinstall the version presently installed, use `force = TRUE`.') |
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.
Slight correction: this won't necessarily install the presently-installed version; it will install the version specified by the version
parameter. Also, getting here doesn't necessarily mean that the latest version is installed; it just means that the version is >= to version
.
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 updated the message to reflect this.
@wch let's try round 4? |
Thanks! |
This PR implements the PhantomJS installation check as described in #25 by:
is_phantomjs_installed()
function that returnsTRUE
/FALSE
if PhantomJS is installed or not.install_phantomjs()
to includeforce
, which controls whether PhantomJS will be installed or not if it already is present on the user's computer.