Skip to content

install_github with space in .libPaths()[1] #73

Closed
@mathematicalcoffee

Description

@mathematicalcoffee

Issue was raise in this stackoverflow question -- the user is installing a package (under cygwin) using install_github, and their R library path has a space in it.

Copied the log from that question:

library(devtools)
install_github('ggbiplot','vqv')
Warning: invalid package 'Yaseen/R/win-library/2.14'
Error: ERROR: cannot cd to directory 'C:/Users/Muhammad'
Error: Command failed (1)
In addition: Warning message:
running command '"C:/PROGRA~1/R/R-214~1.2/bin/i386/R" CMD INSTALL C:\Users\MUHAMM~1\AppData\Local\Temp\Rtmpsx4n5u/ggbiplot_0.5.tar.gz --library=C:/Users/Muhammad Yaseen/R/win-library/2.14' had status 1

The problem arises because the --library=... is not quoted.

Having a (albeit very quick) look at the devtools sources, it looks like if you change install.r such that .libPaths()[1] is quoted in

R(paste("CMD INSTALL ", built_path, " --library=", .libPaths()[1], # <--
    sep = ""), tempdir())

The error might be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions