Skip to content
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

'unzip' must be a single character string when calling install_github #406

Closed
tpoisot opened this issue Dec 21, 2013 · 5 comments
Closed

Comments

@tpoisot
Copy link

tpoisot commented Dec 21, 2013

Using devtools 1.4.1, R 3.0.2, my sessionInfo() is below:

When I try to install any package using install_github, this is the error I get:

> library(devtools)
in> install_github("tpoisot/betalink")
Installing github repo betalink/master from tpoisot
Downloading betalink.zip from https://github.com/tpoisot/betalink/archive/master.zip
Installing package from /tmp/Rtmpn1eyp2/betalink.zip
Erreur dans unzip(src, exdir = target, unzip = getOption("unzip")) : 
  'unzip' must be a single character string

Session info:

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8    
 [5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8   
 [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] devtools_1.4.1

loaded via a namespace (and not attached):
[1] digest_0.6.4   evaluate_0.5.1 httr_0.2       memoise_0.1    parallel_3.0.2
[6] RCurl_1.95-4.1 stringr_0.6.2  tools_3.0.2    whisker_0.3-2 
@wch
Copy link
Member

wch commented Dec 21, 2013

What does it return when you run getOption("unzip")?

@tpoisot
Copy link
Author

tpoisot commented Dec 21, 2013

Silly me...

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

So running options(unzip = "unzip") makes it work. Wouldn't it make sense that it returns a warning if unzip is not set?

@wch
Copy link
Member

wch commented Dec 21, 2013

Strange that it's "". On the Linux machine I have, here's what I get:

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

What distribution of Linux are you using, and did do anything unusual, such as compile R yourself?

@tpoisot
Copy link
Author

tpoisot commented Dec 21, 2013

I'm using Arch Linux, and I haven't compiled R myself. I guess it can be solved by

if(getOption("unzip") == "") options(unzip = 'internal')

somewhere in the package...

@tpoisot tpoisot closed this as completed Dec 21, 2013
@wch
Copy link
Member

wch commented Dec 21, 2013

It's probably best not to put it in your package, since it may unexpectedly change the state of the option for other users. This may be helpful: http://stackoverflow.com/questions/20408250/default-options-setting-for-unzip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants