v0.2.3 : execution shell des commandes avec pipe (rustup, bun, uv) + rafraichissement du PATH + python3 satisfait python
This commit is contained in:
+7
-13
@@ -151,19 +151,13 @@ pub fn ensure_deps(app: &App, agent: &AgentDef, runner: &dyn Runner) -> Result<(
|
||||
let proceed = app
|
||||
.confirm(&format!("Run the detected installer for {}? -> {cmd}", os.name))?;
|
||||
if proceed {
|
||||
if let Ok(tokens) = shell_words::split(cmd) {
|
||||
if !tokens.is_empty() {
|
||||
let prog = tokens[0].clone();
|
||||
let args: Vec<String> = tokens[1..].to_vec();
|
||||
let empty = BTreeMap::new();
|
||||
let out = runner.run(&prog, &args, &empty, None, false)?;
|
||||
if out.code != 0 {
|
||||
app.log.warn(&format!(
|
||||
"installation of '{}' failed (exit code {})",
|
||||
dep.name, out.code
|
||||
));
|
||||
}
|
||||
}
|
||||
let code = crate::toolchain::run_install_command(runner, cmd)?;
|
||||
crate::toolchain::refresh_path();
|
||||
if code != 0 {
|
||||
app.log.warn(&format!(
|
||||
"installation of '{}' failed (exit code {code})",
|
||||
dep.name
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user