mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
Avoid loading PowerShell profiles for tool commands
This commit is contained in:
@@ -52,10 +52,10 @@ impl Shell {
|
||||
}
|
||||
ShellType::PowerShell => {
|
||||
let mut args = vec![self.shell_path.to_string_lossy().to_string()];
|
||||
if !use_login_shell {
|
||||
args.push("-NoProfile".to_string());
|
||||
}
|
||||
|
||||
// PowerShell profiles can trigger sandbox-incompatible startup side effects,
|
||||
// so keep tool execution profile-free regardless of login-shell preference.
|
||||
let _ = use_login_shell;
|
||||
args.push("-NoProfile".to_string());
|
||||
args.push("-Command".to_string());
|
||||
args.push(command.to_string());
|
||||
args
|
||||
|
||||
Reference in New Issue
Block a user