Always prepend caddy command with dot (#117)

Fix xcaddy run on windows with go 1.19

See https://github.com/golang/go/issues/43724
This commit is contained in:
ydylla 2022-09-12 21:41:27 +02:00 committed by GitHub
parent 0bd3c1dfd5
commit 25c412f1ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,10 +164,11 @@ func runBuild(ctx context.Context, args []string) error {
}
func getCaddyOutputFile() string {
f := "." + string(filepath.Separator) + "caddy"
if runtime.GOOS == "windows" {
return "caddy.exe"
f += ".exe"
}
return "." + string(filepath.Separator) + "caddy"
return f
}
func runDev(ctx context.Context, args []string) error {