Skip to main content

normalize_command_for_shell

Function normalize_command_for_shell 

Source
pub fn normalize_command_for_shell(command: &str) -> String
Expand description

Normalize command separators for the detected Windows shell.

  • cmd.exe (/C): ; is invalid → convert to &&
  • PowerShell 5.x (-Command): && is invalid → convert to ;
  • POSIX / PS7+ via Git Bash (-c): no changes needed