Expand tilde and show error message

This commit is contained in:
Dheepak Krishnamurthy 2021-03-18 07:25:58 -06:00
parent d351b86c30
commit d52699abe7

View file

@ -1097,6 +1097,7 @@ impl TTApp {
}
let shell = format!("{} {}", shell, task_uuid);
let shell = shellexpand::tilde(&shell).into_owned();
match shlex::split(&shell) {
Some(cmd) => {
let mut command = Command::new(&cmd[0]);
@ -1116,10 +1117,7 @@ impl TTApp {
))
}
}
Err(_) => Err(format!(
"Cannot run `{}`. Check documentation for more information",
shell,
)),
Err(s) => Err(format!("`{}` failed: {}", shell, s,)),
}
}
None => Err(format!("Unable to run `{}`. Cannot shlex split `{}`", shell, shell)),