aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-03 18:26:23 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-03 18:26:23 +0200
commit821ada0b8c3ffef3d4286f3c4fc15871ff9b5f65 (patch)
treeccda5ab8d3cc298c85422cf83c3d95274de77747 /pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs
parentpkgs/*/update.sh: Perform more through cargo updates (diff)
downloadnixos-config-821ada0b8c3ffef3d4286f3c4fc15871ff9b5f65.zip
pkgs/tskm: Update `taskchampion` to 3.x
Diffstat (limited to 'pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs')
-rw-r--r--pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs b/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs
index 4e433143..12a0180d 100644
--- a/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs
+++ b/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs
@@ -10,19 +10,19 @@
use std::{
env,
- fs::{self, File, OpenOptions, read_to_string},
+ fs::{self, read_to_string, File, OpenOptions},
io::Write,
process::Command,
};
-use anyhow::{Context, Result, bail};
+use anyhow::{bail, Context, Result};
use crate::{cli::NeorgCommand, state::State};
-pub fn handle(command: NeorgCommand, state: &mut State) -> Result<()> {
+pub async fn handle(command: NeorgCommand, state: &mut State) -> Result<()> {
match command {
NeorgCommand::Task { task } => {
- let project = task.project(state)?;
+ let project = task.project(state).await?;
let base = dirs::data_local_dir()
.expect("This should exists")
.join("tskm/notes");
@@ -46,7 +46,8 @@ pub fn handle(command: NeorgCommand, state: &mut State) -> Result<()> {
let mut file = options.open(&path)?;
file.write_all(
- format!("* {} (% {})", task.description(state)?, task.uuid()).as_bytes(),
+ format!("* {} (% {})", task.description(state).await?, task.uuid())
+ .as_bytes(),
)
.with_context(|| {
format!("Failed to write task uuid to file: '{}'", path.display())
@@ -92,7 +93,7 @@ pub fn handle(command: NeorgCommand, state: &mut State) -> Result<()> {
}
{
- task.mark_neorg_data(state)?;
+ task.mark_neorg_data(state).await?;
}
}
}