githubnemo / CompileDaemon

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

Command fails space in arguments #59

Open scottix opened 3 years ago

scottix commented 3 years ago

In the command and I think the build although haven't tested If you have a space in the option it will fail to run.

CompileDaemon --build="go build -o program main.go " --command="./program --option=\"1 2\""

Seems to split on spaces which is not always correct.

githubnemo commented 3 years ago

That's true. I don't think CompileDaemon will ever cover this. Write your command to a shell script instead and invoke that instead. For example:

command.sh:

#!/bin/sh

./program --option="1 2"

run:

CompileDaemon --command ./command.sh