sessions : am sessions --resume <id> (issue #32) - relance en arriere-plan avec les arguments et le cwd d'origine, cwd optionnel dans spawn_background, gardes running/repl/erreurs claires
This commit is contained in:
@@ -98,6 +98,7 @@ pub fn spawn_background(
|
||||
program: &Path,
|
||||
args: &[String],
|
||||
env: &BTreeMap<String, String>,
|
||||
cwd: Option<&Path>,
|
||||
) -> Result<u32> {
|
||||
let log = agent_log_path(app, agent_name);
|
||||
if app.dry_run() {
|
||||
@@ -121,6 +122,9 @@ pub fn spawn_background(
|
||||
.envs(env)
|
||||
.stdout(Stdio::from(file.try_clone()?))
|
||||
.stderr(Stdio::from(file));
|
||||
if let Some(dir) = cwd {
|
||||
cmd.current_dir(dir);
|
||||
}
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::process::CommandExt;
|
||||
|
||||
Reference in New Issue
Block a user