mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-23 20:16:41 +02:00
feat: Better error messages for task_shortcut ✨
This commit is contained in:
parent
581cc4aa56
commit
9482c5caf7
1 changed files with 5 additions and 5 deletions
10
src/app.rs
10
src/app.rs
|
@ -1884,8 +1884,8 @@ impl TaskwarriorTui {
|
|||
let r = match shlex::split(&shell) {
|
||||
Some(cmd) => {
|
||||
let mut command = std::process::Command::new(&cmd[0]);
|
||||
for s in cmd.iter().skip(1) {
|
||||
command.arg(s);
|
||||
for i in cmd.iter().skip(1) {
|
||||
command.arg(i);
|
||||
}
|
||||
if let Ok(child) = command.spawn() {
|
||||
let output = child.wait_with_output();
|
||||
|
@ -1903,13 +1903,13 @@ impl TaskwarriorTui {
|
|||
))
|
||||
}
|
||||
}
|
||||
Err(s) => Err(format!("`{}` failed: {}", shell, s)),
|
||||
Err(s) => Err(format!("`{}` failed to wait with output: {}", shell, s)),
|
||||
}
|
||||
} else {
|
||||
Err(format!("`{}` failed: {}", shell, s))
|
||||
Err(format!("`{}` failed: Unable to spawn shortcut number {}", shell, s))
|
||||
}
|
||||
}
|
||||
None => Err(format!("Unable to run shortcut `{}`: shlex::split(`{}`) failed.", s, shell)),
|
||||
None => Err(format!("Unable to run shortcut number {}: shlex::split(`{}`) failed.", s, shell)),
|
||||
};
|
||||
|
||||
if task_uuids.len() == 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue