diff --git a/.taskfiles/frontend.yml b/.taskfiles/frontend.yml index 943caaf81b..9a3b1bdd47 100644 --- a/.taskfiles/frontend.yml +++ b/.taskfiles/frontend.yml @@ -85,7 +85,8 @@ tasks: # full path, hostname, or user. Consumed at dev-serve time by vite.config # and dropped from production builds. STIRLING_DEV_LABEL: - sh: basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" + sh: >- + {{if eq OS "windows"}}powershell -NoProfile -Command '$root = git rev-parse --show-toplevel 2>$null; if (-not $root) { $root = (Get-Location).Path }; Split-Path -Leaf $root'{{else}}basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"{{end}} cmds: - npx vite editor --mode {{.MODE}} --port {{.PORT}}{{if .OPEN}} --open{{end}}