-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
I know this is the bad syntax for using env following
However, this is the first think I have tried to understand how it works. Setting run(env = "current") does not work well.
I think it should fail nicer (like env can't be just current), or it should just ignore and be the default (as it is the same as env = NULL right? It seems so.
processx::run("pwsh", c("-C", "echo $env:R_HOME"))
#> $status
#> [1] 0
#>
#> $stdout
#> [1] "C:/PROGRA~1/R/R-45~1.0\r\n"
#>
#> $stderr
#> [1] ""
#>
#> $timeout
#> [1] FALSEprocessx::run("pwsh", c("-C", "echo $env:R_HOME"), env = c("current"))
#> Error in c("process_initialize(self, private, command, args, stdin, stdout, ", : ! Native call to `processx_exec` failed
#> Caused by error in `chain_call(c_processx_exec, command, c(command, args), pty, pty_options, …`:
#> ! make environment for process (system error 87, Paramètre incorrect.
#> ) @win/processx.c:325 (env_strncmp)processx::run("pwsh", c("-C", "echo $env:R_HOME"), env = c("current", R_HOME = "dummy"))
#> $status
#> [1] 0
#>
#> $stdout
#> [1] "dummy\r\n"
#>
#> $stderr
#> [1] ""
#>
#> $timeout
#> [1] FALSECreated on 2025-06-04 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior