bin/taud: fix a bug when adding a task to month_tasks

This commit is contained in:
ghassmo
2022-04-11 13:32:18 +04:00
parent a3fe1de486
commit 0eff8d1b00
4 changed files with 6 additions and 4 deletions

View File

@@ -35,13 +35,13 @@ multiple users can collaborate by working on the same tasks, and all users will
SUBCOMMANDS:
add Add a new task
get Get task by ID
get-comment Get task's comments
get-state Get task state
help Print this message or the help of the given subcommand(s)
list List open tasks
set-comment Set comment for a task
set-state Set task state
show Show task by ID
update Update/Edit an existing task by ID

View File

@@ -26,7 +26,9 @@ impl MonthTasks {
}
pub fn add(&mut self, ref_id: &str) {
self.task_tks.push(ref_id.into());
if !self.task_tks.contains(&ref_id.into()) {
self.task_tks.push(ref_id.into());
}
}
pub fn objects(&self) -> TaudResult<Vec<TaskInfo>> {

View File

@@ -5,7 +5,7 @@
# Path to the dataset
dataset_path = "~/.config/tau"
datastore_raft = "~/.config/tau.db"
datastore_raft = "~/.config/tau/tau.db"
# Path to DER-formatted PKCS#12 archive. (used only with tls url)
# This can be created using openssl:

View File

@@ -1,4 +1,4 @@
#!/bin/sh
bins="$(find bin -maxdepth 1 | tail -n+2 | sed 's,bin/,,' | tr '\n' ' ' | sed 's,tau,,')"
bins="$(find bin -maxdepth 1 | tail -n+2 | sed 's,bin/,,' | tr '\n' ' ' | sed 's,\<tau\>,, ')"
bins_tau="$(find bin/tau -maxdepth 1 | sed 's,bin/tau/,,' | grep -w 'taud\|tau-cli' | tr '\n' ' ')"
make BINS="$bins_tau $bins"