Commit 6e4a7714e6c6

Vincent Demeester <vincent@sbr.pm>
2026-01-09 01:09:15
fix(kerkouane): Move PATH export before basename usage
- Fix "basename: command not found" error in gitmal script - Ensure PATH is set before any commands are executed Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 97907d6
Changed files (1)
systems
kerkouane
systems/kerkouane/extra.nix
@@ -204,6 +204,9 @@ in
       #!${pkgs.bash}/bin/bash
       set -euo pipefail
 
+      # Set PATH to include git and coreutils (gitmal needs git, script needs basename)
+      export PATH="${pkgs.git}/bin:${pkgs.coreutils}/bin:$PATH"
+
       REPO_PATH="$1"
       THEME="''${2:-github-dark}"  # Default to 'github-dark' theme if not specified
       REPO_NAME=$(basename "$REPO_PATH" .git)
@@ -214,9 +217,6 @@ in
       echo "Output directory: $OUTPUT_DIR"
       echo "Theme: $THEME"
 
-      # Set PATH to include git (gitmal needs it internally)
-      export PATH="${pkgs.git}/bin:${pkgs.coreutils}/bin:$PATH"
-
       # Generate static site with gitmal
       cd "$REPO_PATH"
       ${pkgs.gitmal}/bin/gitmal --output "$OUTPUT_DIR" --theme "$THEME"