mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 17:57:19 +02:00
fix: Add check in task subprocess for task uuid
This commit is contained in:
parent
8766b0c64d
commit
2f8f245a97
1 changed files with 11 additions and 1 deletions
12
src/app.rs
12
src/app.rs
|
@ -1618,9 +1618,11 @@ impl TaskwarriorTui {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
let task_uuids = self.selected_task_uuids();
|
||||
|
||||
let shell = self.command.as_str();
|
||||
|
||||
match shlex::split(shell) {
|
||||
let r = match shlex::split(shell) {
|
||||
Some(cmd) => {
|
||||
// first argument must be a binary
|
||||
let mut command = Command::new(&cmd[0]);
|
||||
|
@ -1638,7 +1640,15 @@ impl TaskwarriorTui {
|
|||
}
|
||||
}
|
||||
None => Err(format!("Cannot run subprocess. Unable to shlex split `{}`", shell)),
|
||||
};
|
||||
|
||||
if task_uuids.len() == 1 {
|
||||
if let Some(uuid) = task_uuids.get(0) {
|
||||
self.current_selection_uuid = Some(*uuid);
|
||||
}
|
||||
}
|
||||
|
||||
r
|
||||
}
|
||||
|
||||
pub fn task_log(&mut self) -> Result<(), String> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue