aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-08 10:01:15 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-08 10:01:15 +0200
commitebece73bfda6a95c5b9a7501272c0e497b46e4c8 (patch)
tree47ee79e2726c481b58ffc719ff5d69878779007f /pkgs/by-name
parentfix(pkgs/tskm/neorg): Avoid trying to write into `/index.norg` (diff)
downloadnixos-config-ebece73bfda6a95c5b9a7501272c0e497b46e4c8.zip
fix(pkgs/tskm/neorg): Make path in commit message relative
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs12
1 files changed, 4 insertions, 8 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 577de02c..d904b12e 100644
--- a/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs
+++ b/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs
@@ -13,10 +13,10 @@ pub fn handle(command: NeorgCommand, state: &mut State) -> Result<()> {
match command {
NeorgCommand::Task { id } => {
let project = id.project(state)?;
- let path = dirs::data_local_dir()
+ let base = dirs::data_local_dir()
.expect("This should exists")
- .join("tskm/notes")
- .join(project.get_neorg_path()?);
+ .join("tskm/notes");
+ let path = base.join(project.get_neorg_path()?);
fs::create_dir_all(path.parent().expect("This should exist"))?;
@@ -69,11 +69,7 @@ pub fn handle(command: NeorgCommand, state: &mut State) -> Result<()> {
.args([
"commit",
"--message",
- format!(
- "chore({}): Update",
- path.parent().expect("Should have a parent").display()
- )
- .as_str(),
+ format!("chore({}): Update", project.get_neorg_path()?.display()).as_str(),
"--no-gpg-sign",
])
.current_dir(path.parent().expect("Will exist"))