INNER CODE UNIT · Rust
apply
kubie-org/kubie · src/shell/mod.rs:35
pub fn apply(&self, cmd: &mut Command) {
for (name, value) in &self.vars {
cmd.env(name, value);
}
}
}
pub struct ShellSpawnInfo<'s, 'n> {
settings: &'s Settings,
env_vars: EnvVars<'n>,
prompt: String,
}
pub fn spawn_shell(settings: &Settings, config: KubeConfig, session: &Session) -> Result<()> {
let kind = match &settings.shell {
Some(shell) => ShellKind::from_str(shell).ok_or_else(|| anyhow!("Invalid shell setting: {}", shell))?,
None => detect()?,
};