error on Windows
Start-Process : A positional parameter cannot be found that accepts argument '.\tmp\main.exe'.
At line:1 char:1
+ start /wait /b .\tmp\main.exe server
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
config:
[build]
cmd = "go build -o ./tmp/main.exe ."
bin = ".\\tmp\\main.exe"
full_bin = ".\\tmp\\main.exe"
A similar error occurred on the command line in the PowerShell environment:
air '-build.cmd' 'go build ./cmd/wpg' '-build.bin' 'wpg web -a 22567 -r E:\conero\....'
Error msg:
+ & "........\wpg web -a 22567 - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\conero\repos...endoc\uymasdocs:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
In fact, directly executing commands that prompt exceptions is effective. Have to switch to v1.61.7, back.
Hi, does anyone know how to solve this problem?
failed to start tmp\main.exe, error: exec: "cmd": executable file not found in %PATH%
can confirm. the Start-Process : A positional parameter cannot be found that accepts argument '.\tmp\main.exe'. issue happens only in the latest 1.62.0 version. Switching to version 1.61.7 fixes the issue
Same, you can work around this somewhat by creating a bat file that runs air. This effectively runs air inside CMD so it works properly. Not ideal but it works.
Set-Location $PSScriptRoot
Start-Process -FilePath "cmd" -ArgumentList "/c", "air" -Wait -NoNewWindow
can confirm. the Start-Process : A positional parameter cannot be found that accepts argument '.\tmp\main.exe'. issue happens only in the latest 1.62.0 version. Switching to version 1.61.7 fixes the issue
for someone has this issue please try this one, i fix by this way
can confirm. the Start-Process : A positional parameter cannot be found that accepts argument '.\tmp\main.exe'. issue happens only in the latest 1.62.0 version. Switching to version 1.61.7 fixes the issue
This resolved my issue as well. Thank you!
Start-Process : A positional parameter cannot be found that accepts argument '.\tmp\main.exe'. At line:1 char:1 + start /wait /b .\tmp\main.exe server + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommandconfig:
[build] cmd = "go build -o ./tmp/main.exe ." bin = ".\\tmp\\main.exe" full_bin = ".\\tmp\\main.exe"
@quinn, i already attached new PR, could you test in your environment? https://github.com/air-verse/air/pull/793
thanks.
can confirm. the Start-Process : A positional parameter cannot be found that accepts argument '.\tmp\main.exe'. issue happens only in the latest 1.62.0 version. Switching to version 1.61.7 fixes the issue
go install github.com/air-verse/[email protected]