Melkeydev/go-blueprint

[Bug] air.toml configuration will not work on windows

Closed this issue · 0 comments

What is the problem?

hi, first of all thanks for this awsome tool you made, I know you hate Windows but this air configuration will not work on Windows because of this MakeFile:10 @go build -o main cmd/api/main.go
it works fine on linux but on windows it should be @go build -o tmp/main.exe cmd/api/main.go
and air will not confuse which file to run cause If you don't specify .exe it will say 'main' is not recognized as an internal or external command, operable program or batch file.

I am going to contribute on this project

Operating System

windows 10

Architecture Version (x86, x64, arm, etc)

x64

Steps to reproduce

detect the os and make the MakeFile based on that

I can contribute for fixing this error

on windows it should generate this:

#.air.toml
bin = ".\\main.exe"
cmd = "make build"

MakeFile

@go build -o main.exe cmd/api/main.go

instead of

#.air.toml
bin = "./main"
cmd = "make build"

MakeFile

@go build -o main cmd/api/main.go

Relevant log output

"Building..."

'E:\backend\gopi\main' is not recognized as an internal or external command,
operable program or batch file.