Skip to content

Commit

Permalink
Merge pull request #89 from wch/fix-phantom-check
Browse files Browse the repository at this point in the history
Fix phantom installation logic
  • Loading branch information
wch authored Dec 13, 2019
2 parents 86a4f54 + 62a98a6 commit d206bd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: webshot
Title: Take Screenshots of Web Pages
Version: 0.5.2
Version: 0.5.2.9000
Authors@R: c(
person("Winston", "Chang", email = "winston@rstudio.com", role = c("aut", "cre")),
person("Yihui", "Xie", role = "ctb"),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
webshot 0.5.2.9000
=============

* Fixed logic in `install_phantomjs()` when `force=TRUE` is used. ([#89](https://github.com/wch/webshot/pull/89))

webshot 0.5.2
=============

Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ install_phantomjs <- function(version = '2.1.1',
baseURL = 'https://github.com/wch/webshot/releases/download/v0.3.1/',
force = FALSE) {

if (is_phantomjs_version_latest(version) && !force) {
if (!force && is_phantomjs_version_latest(version)) {
message('It seems that the version of `phantomjs` installed is ',
'greater than or equal to the requested version.',
'To install the requested version or downgrade to another version, ',
Expand Down

0 comments on commit d206bd7

Please sign in to comment.