Skip to content

Commit

Permalink
fix build error for ubuntu: Problem locating local R install (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu authored Apr 15, 2024
1 parent fbeceb5 commit 6883db3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ fn byte_array_to_os_string(bytes: &[u8]) -> OsString {

// Execute an R script and return the captured output
fn r_command<S: AsRef<OsStr>>(r_binary: S, script: &str) -> io::Result<OsString> {
let out = Command::new(r_binary).args(["-s", "-e", script]).output()?;
// we must use --vanilla,
// 1. user Rprofile may contain message into stdout
// 2. prevent R startup message
let out = Command::new(r_binary).args(["-s", "--vanilla", "-e", script]).output()?;

// if there are any errors we print them out, helps with debugging
if !out.stderr.is_empty() {
Expand Down

0 comments on commit 6883db3

Please sign in to comment.