Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

fix(frontend): make development label detection cross-platform (#6988)

Ludy2c1a66688956
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}}