task: compute dev label without basename (Windows PowerShell PATH fix)

The frontend dev tasks set a cosmetic STIRLING_DEV_LABEL via `basename`,
which isn't on PATH under go-task's shell on Windows PowerShell, so
`task frontend:dev:*` failed with exit 127. Use POSIX parameter expansion
(${dir##*/}), which go-task's built-in shell supports on every platform.
This commit is contained in:
Connor Yoh
2026-07-13 15:42:55 +01:00
parent c3dc6bc822
commit 615efbbde0
+3 -1
View File
@@ -84,8 +84,10 @@ tasks:
# Only the worktree folder basename (e.g. "wt1") is exposed — never the
# full path, hostname, or user. Consumed at dev-serve time by vite.config
# and dropped from production builds.
# Use shell parameter expansion (works in go-task's built-in shell on every
# platform) rather than `basename`, which isn't on PATH under Windows PowerShell.
STIRLING_DEV_LABEL:
sh: basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
sh: dir="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; echo "${dir##*/}"
cmds:
- npx vite editor --mode {{.MODE}} --port {{.PORT}}{{if .OPEN}} --open{{end}}