Open cderv opened 5 years ago
For getting the version on windows, I did not manage to make the workaround proposed in chromium bug report with wmic datafile
However, using powershell it worked.
args <- c(
"-NoLogo",
"-NoProfile",
"-Command",
glue::glue("(Get-Item -Path {glue::single_quote(Sys.getenv('HEADLESS_CHROME'))}).VersionInfo.ProductVersion")
)
res <- processx::run("powershell", args)
trimws(res$stdout)
#> [1] "70.0.3508.0"
Is this something that we could do when on windows OS ?
oh i rly like that approach! do you want me to change the code or would you like to PR?
I could do a PR for chrome_version
to this specific case on windows.
About the call to chrome_version
,
https://github.com/hrbrmstr/decapitated/blob/ccab8fa640b415cf70535013f5bc4280b6af0e11/R/chrome-pdf.r#L72
Object vers
does not seem to be used after. am I missing something ?
I'm not sure why I put that in (I think I had plans to potentially enable functions by new features they might add if folks need to keep using older versions.
I am on windows 10 and
decapitated::chrome_version()
is not working properly. This affects others functions that calls it, likedecapitated::chrome_dump_pdf()
.This is a related to a known bug I think https://bugs.chromium.org/p/chromium/issues/detail?id=158372
--version
does not work on windows.Looking at the code, I am not sure to see why the need to get the version. In
chrome_dump_pdf
for example,vers
is not used after being assigned. Should we get rid ofchrome_version
calls in functions that do not need it ?If version is needed, it needs a workaround on windows.
To share, in case you don't know, there is another approach with chrome headless in pagedown to propose a function like
chrome_dump_pdf