r-hub / rhub

R-hub API client
https://r-hub.github.io/rhub/
Other
353 stars 51 forks source link

zip not found #484

Closed sjentsch closed 4 months ago

sjentsch commented 3 years ago

When testing my package on r-hub, I get the following error message:

Error in utils::zip(fleNme, "data.bin", flags = "-r9Xq") : argument 'zip' must be a non-empty character string

zip defaults to Sys.getenv("R_ZIPCMD", "zip")

It appears as if the string returned by Sys.env is empty on the following OSes: Fedora Linux, R-devel, clang, gfortran Fedora Linux, R-devel, GCC

nunotexbsd commented 7 months ago

@sjentsch

I'm with same problem on other R program:

> export(mtcars, "mtcars.tsv.zip")
Error in utils::zip(cfile2, files = basename(filename)) :
  argument 'zip' must be a non-empty character string
> Sys.getenv("R_ZIPCMD", "zip")
[1] ""

Any clues how to fix? Cheers

sjentsch commented 7 months ago

I switched to using the R-package zip instead of using the zip from utils. https://github.com/sjentsch/jmvReadWrite/blob/98be1a9f7f49d7b41f93156a7b7422596ccfcd04/DESCRIPTION#L26 https://github.com/sjentsch/jmvReadWrite/blob/main/R/read_omv.R https://github.com/sjentsch/jmvReadWrite/blob/98be1a9f7f49d7b41f93156a7b7422596ccfcd04/R/write_omv.R#L490

gaborcsardi commented 4 months ago

This issue is about the previous R-hub system, it does not apply to the new system, so I am closing it now. Please see https://r-hub.github.io/rhub/ for the new system, R-hub v2.