RStudio Cloud does not set R_UNZIPCMD

Something that was noticed on RStudio Cloud: On most unix-alikes, R will set the "unzip" option to the system unzip utility, typically at /usr/bin/unzip. E.g.

> getOption("unzip")
[1] "/usr/bin/unzip"

This, in turn, gets initialized by the R_UNZIPCMD environment variable, which is typically set by R at startup based on how R was built. However, on RStudio Cloud, this doesn't get set and R uses its internal unzip implementation, which has some issues -- e.g. file permissions are not copied. ( That is, on RStudio Cloud:

> getOption("unzip")
[1] "internal"

I think this typically implies R was built on a system with no unzip implementation available, although one does appear to be installed on RStudio Cloud.

This could be fixed by patching the R installation .Renviron, e.g. I see in the system .Renviron located at /opt/R/3.4.4/lib/R/etc/Renviron:

## Default zip/unzip commands

Any chance this could be changed to point to the associated /usr/bin programs?

Yes, we are looking into solving this systematically. Updates to follow.

1 Like

The fix for this has been rolled out.