about summary refs log tree commit diff stats
path: root/modules/by-name/ta/taskwarrior/module.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-04 22:45:04 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-04 22:51:31 +0200
commit36d7f244ff48325a35fae8ed9d2877d0ef91f603 (patch)
tree7ba6d6509b4ee04e891a3c9313cdcbaed7ecf8a5 /modules/by-name/ta/taskwarrior/module.nix
parentfix(modules/taskwarrior/mkHook): Remove superfluous double quote (diff)
downloadnixos-config-36d7f244ff48325a35fae8ed9d2877d0ef91f603.zip
fix(modules/taskwarrior/mkHook): Fix shellcheck issues
Diffstat (limited to '')
-rw-r--r--modules/by-name/ta/taskwarrior/module.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/by-name/ta/taskwarrior/module.nix b/modules/by-name/ta/taskwarrior/module.nix
index e4e264e6..354d3724 100644
--- a/modules/by-name/ta/taskwarrior/module.nix
+++ b/modules/by-name/ta/taskwarrior/module.nix
@@ -23,7 +23,7 @@
 
     executable = pkgs.writeShellApplication {
       name = "add-hook-${builtins.baseNameOf path}";
-      runtimeInputs = [pkgs.taskwarrior3 pkgs.coreutils] ++ deps;
+      runtimeInputs = [pkgs.taskwarrior3 pkgs.coreutils pkgs.gnugrep] ++ deps;
       inheritPath = false;
       text =
         # bash
@@ -37,9 +37,9 @@
               # TODO: We should probably be smarter with the debug detection <2025-04-04>
               if echo "$2" | grep --quite 'rc.debug.hooks='; then
                 set -x
-                mkdir --parents "~/.cache/task"
-                exec >>"~/.cache/task/hook.log.$0"
-                exec 2>>"~/.cache/task/hook.log.$0"
+                mkdir --parents "$HOME/.cache/task"
+                exec >>"$HOME/.cache/task/hook.log.$1"
+                exec 2>>"$HOME/.cache/task/hook.log.$1"
               fi
           }
 
@@ -56,7 +56,7 @@
           # We don't change the task, thus immediately return the JSON
           echo "$new_task"
 
-          enable_hook_dbg
+          enable_hook_dbg "$@"
           addedCall "$new_task" "$old_task"
 
           exit 0