Skip to content

Commit

Permalink
Always prepend caddy command with dot (#117)
Browse files Browse the repository at this point in the history
Fix xcaddy run on windows with go 1.19

See golang/go#43724
  • Loading branch information
ydylla authored Sep 12, 2022
1 parent 0bd3c1d commit 25c412f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 25c412f

Please sign in to comment.