mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
Modified SlavePty spawn_command macros to target windows/non-windows platforms
This commit is contained in:
parent
df290f56de
commit
9d3dfeb709
@ -164,7 +164,7 @@ impl_downcast!(ChildKiller);
|
||||
/// Can be used to spawn processes into the pty.
|
||||
pub trait SlavePty {
|
||||
/// Spawns the command specified by the provided CommandBuilder
|
||||
#[cfg(unix)]
|
||||
#[cfg(not(windows))]
|
||||
fn spawn_command(&self, cmd: CommandBuilder) -> Result<Box<dyn Child + Send + Sync>, Error>;
|
||||
/// Spawns a command specified by the provided CommandBuilder.
|
||||
/// Accepts an Option<HANDLE> to a primary/impersonation token to spawn the process in the context of a different user.
|
||||
|
@ -109,7 +109,7 @@ struct Slave {
|
||||
}
|
||||
|
||||
impl SlavePty for Slave {
|
||||
#[cfg(unix)]
|
||||
#[cfg(not(windows))]
|
||||
fn spawn_command(&self, cmd: CommandBuilder) -> anyhow::Result<Box<dyn Child + Send + Sync>> {
|
||||
ensure!(
|
||||
cmd.is_default_prog(),
|
||||
|
Loading…
Reference in New Issue
Block a user