From 262da2f114f249e4b1abef42277d84a0a9df1355 Mon Sep 17 00:00:00 2001 From: Ryan Walters Date: Fri, 7 Nov 2025 11:35:10 -0600 Subject: [PATCH] fix: use portable file timestamp comparison in fish brew cache check Replace fish's `-nt` test operator (not available in fish) with explicit stat-based timestamp comparison for cross-shell compatibility. --- home/.chezmoitemplates/scripts/commonrc.fish.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/.chezmoitemplates/scripts/commonrc.fish.tmpl b/home/.chezmoitemplates/scripts/commonrc.fish.tmpl index 33ccff0..5ee30d6 100644 --- a/home/.chezmoitemplates/scripts/commonrc.fish.tmpl +++ b/home/.chezmoitemplates/scripts/commonrc.fish.tmpl @@ -46,7 +46,7 @@ if test -f /home/linuxbrew/.linuxbrew/bin/brew # Regenerate cache if: doesn't exist, >7 days old, or brew binary is newer if not test -f "$brew_cache"; \ or test (math (date +%s) - (stat -c %Y "$brew_cache" 2>/dev/null || echo 0)) -gt 604800; \ - or test "$brew_bin" -nt "$brew_cache" + or test (stat -c %Y "$brew_bin" 2>/dev/null || echo 0) -gt (stat -c %Y "$brew_cache" 2>/dev/null || echo 0) mkdir -p (dirname "$brew_cache") $brew_bin shellenv > "$brew_cache" 2>/dev/null end