mirror of
https://github.com/caddyserver/xcaddy.git
synced 2025-01-22 08:36:28 +01:00
add ".exe" when cross compiling for windows (#179)
* add ".exe" when cross compiling for windows * add ".exe" when cross compiling for windows or on windows without cross-compiling * wait until 1.23 is released
This commit is contained in:
parent
85e12f87b2
commit
bff687835e
1 changed files with 2 additions and 1 deletions
|
@ -194,7 +194,8 @@ func runBuild(ctx context.Context, args []string) error {
|
|||
|
||||
func getCaddyOutputFile() string {
|
||||
f := "." + string(filepath.Separator) + "caddy"
|
||||
if runtime.GOOS == "windows" {
|
||||
// compiling for Windows or compiling on windows without setting GOOS, use .exe extension
|
||||
if os.Getenv("GOOS") == "windows" || (os.Getenv("GOOS") == "" && runtime.GOOS == "windows") {
|
||||
f += ".exe"
|
||||
}
|
||||
return f
|
||||
|
|
Loading…
Reference in a new issue