githubnemo / CompileDaemon

Very simple compile daemon for Go
BSD 2-Clause "Simplified" License
1.61k stars 153 forks source link

Could not start command: can't start command: fork/exec ~/directory/to/go-project: no such file or directory #84

Closed quiet-node closed 1 year ago

quiet-node commented 1 year ago

go_version: go version go1.19.1 darwin/amd64 OS: MacOS arch: M1

Hello, I'm trying to configure CompileDaemon to work with a project outside of $GOPATH/src. I downloaded and installed CompileDaemon, set the GO111MODULE=on, but can't get it to work.

My project is located at ~/Documents/go-demo. I run this command:

~/go/bin/CompileDaemon -command="~/Documents/go-demo" 

and get this result.

2022/09/28 23:38:13 Running build command!
2022/09/28 23:38:14 Build ok.
2022/09/28 23:38:14 Restarting the given command.
2022/09/28 23:38:14 Could not start command: can't start command: fork/exec ~/Documents/go-demo: no such file or directory

Just so you know when I try to CompileDaemon a project created inside $GOPATH/src, it works perfectly. I just don't want my project be in $GOPATH/src since I have my own coding dir where it has other projects too. Anyway, not sure what I did wrong. Please help Y_Y

quiet-node commented 1 year ago

Sorry it's "user" error. I should run it like

~/go/bin/CompileDaemon -command="./go-demo"