Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Oct 11, 2024
1 parent 0467f49 commit 8325455
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/tempdir.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ renv_tempdir_init <- function() {

# check that scripts within the R temporary directory can be executed
script <- tempfile("renv-script-", fileext = ".sh")
writeLines("echo hello world", con = script)
writeLines("#!/usr/bin/env sh", con = script)
Sys.chmod(script, mode = "0755")
on.exit(unlink(script), add = TRUE)

status <- system2("/bin/sh", shQuote(script), stdout = FALSE, stderr = FALSE)
status <- system(script, ignore.stdout = TRUE, ignore.stderr = TRUE)
if (identical(status, 0L))
return()

Expand Down

0 comments on commit 8325455

Please sign in to comment.