Skip to content

Commit 399c458

Browse files
committed
Protect path the binary from possible spaces (closes #1234)
1 parent b6d25ce commit 399c458

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2022-10-12 Dirk Eddelbuettel <[email protected]>
2+
3+
* R/Attributes.R (sourceCpp): Protect path to binary from spaces
4+
15
2022-10-06 Dirk Eddelbuettel <[email protected]>
26

37
* DESCRIPTION (Version, Date): Roll minor version

R/Attributes.R

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

131131
# grab components we need to build command
132-
r <- paste(R.home("bin"), "R", sep = .Platform$file.sep)
132+
r <- normalizePath(file.path(R.home("bin"), "R"), winslash = "/", mustWork = FALSE)
133133
lib <- context$dynlibFilename
134134
deps <- context$cppDependencySourcePaths
135135
src <- context$cppSourceFilename

0 commit comments

Comments
 (0)