Enum ShellDialect
pub enum ShellDialect {
Posix,
WindowsCmd,
PowerShell,
None,
}Expand description
Shell language understood by a runtime’s command builder.
This is part of the execution boundary: security policy must validate the
same language that RuntimeAdapter::build_shell_command will interpret.
The command-risk policy needs this to apply platform-specific safety rules —
notably the null device: a POSIX shell treats nul as an ordinary relative
filename (so echo x >nul would create/truncate a workspace file), while
Windows cmd.exe resolves it to the discard-only null device. A redirect to
nul is therefore only safe under ShellDialect::WindowsCmd.
The dialect follows the effective execution sink, not merely the host OS.
Docker always runs through sh -c and stays ShellDialect::Posix even on
a Windows host. Native cron execution follows the configured runtime dialect.
Variants§
Posix
POSIX sh/bash semantics — Unix native execution and Docker sh -c.
The conservative default.
WindowsCmd
Windows cmd.exe semantics — native execution on a Windows host.
PowerShell
Windows PowerShell or PowerShell 7+.
None
The runtime does not expose shell execution.
Trait Implementations§
Source§impl Clone for ShellDialect
impl Clone for ShellDialect
Source§fn clone(&self) -> ShellDialect
fn clone(&self) -> ShellDialect
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more