Skip to content

Commit beb26a4

Browse files
committed
Update to protect path the binary from possible spaces
1 parent 86943bf commit beb26a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/Attributes.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ sourceCpp <- function(file = "",
129129
} # #nocov end
130130

131131
# grab components we need to build command
132-
r <- normalizePath(file.path(R.home("bin"), "R"), winslash = "/", mustWork = FALSE)
132+
r <- file.path(R.home("bin"), "R")
133+
if (.Platform$OS.type == "windows") r <- shQuote(r)
133134
lib <- context$dynlibFilename
134135
deps <- context$cppDependencySourcePaths
135136
src <- context$cppSourceFilename

0 commit comments

Comments
 (0)