markbates / refresh

MIT License
191 stars 30 forks source link

init not working on macOS #36

Open gugahoi opened 5 years ago

gugahoi commented 5 years ago

Unsure on what is happening but refresh init is not creating the default yml file. Note that the refresh.yml.bak file is just my backup file to submit this issue. Also note that the project is outside GOPATH and it seems to make no difference if GO111MODULE=on is set.

> ls -l
total 24088
-rw-r--r--@ 1 gus  staff       130 25 Aug 18:28 Makefile
-rwxr-xr-x  1 gus  staff  12272428 25 Aug 18:26 backend*
-rw-------  1 gus  staff      2930 25 Aug 18:24 go.mod
-rw-------  1 gus  staff     39189 25 Aug 18:24 go.sum
-rw-r--r--@ 1 gus  staff      2235 25 Aug 17:38 main.go
drwxr-xr-x  5 gus  staff       160 25 Aug 12:52 pkg/
-rw-r--r--@ 1 gus  staff       997 25 Aug 18:27 refresh.yml.bak
drwxr-xr-x  4 gus  staff       128 25 Aug 14:27 vendor/
> refresh init
Refresh (1.4.0)

> ls -l
total 24088
-rw-r--r--@ 1 gus  staff       130 25 Aug 18:28 Makefile
-rwxr-xr-x  1 gus  staff  12272428 25 Aug 18:26 backend*
-rw-------  1 gus  staff      2930 25 Aug 18:24 go.mod
-rw-------  1 gus  staff     39189 25 Aug 18:24 go.sum
-rw-r--r--@ 1 gus  staff      2235 25 Aug 17:38 main.go
drwxr-xr-x  5 gus  staff       160 25 Aug 12:52 pkg/
-rw-r--r--@ 1 gus  staff       997 25 Aug 18:27 refresh.yml.bak
drwxr-xr-x  4 gus  staff       128 25 Aug 14:27 vendor/

Unable to get any more verbose output from the binary.

refresh run runs without the config file but does not work:

> refresh run
Refresh (1.4.0)

2019/08/25 18:32:49 No configuration loaded, proceeding with defaults
refresh: 2019/08/25 18:32:49 === Rebuild on: :start: ===
refresh: 2019/08/25 18:32:49 === Running: go build -v -o   (PID: 48379) ===
refresh: 2019/08/25 18:32:50 === Building Completed (PID: 48379) (Time: 759.844718ms) ===
refresh: 2019/08/25 18:32:50 === fork/exec : no such file or directory
 ===

However it works fine when I manually create a refresh.yml file.

jergason commented 5 years ago

This happens for me as well.

bhubr commented 4 years ago

Same here, however it does work if you explicitly specify the path to the config file, e.g. refresh init -c refresh.yml.

SeedyROM commented 4 years ago

This also is confirmable for me as well.

ruudk commented 4 years ago

Same issue here.

ruudk commented 4 years ago

refresh run doesn't refresh the file when I make changes to the main.go file either.

hlubek commented 4 years ago

This seems to be not an issue with macOS, it's just caused by an empty config flag and no error checking when dumping the configuration in the init command. I created #41 for a fix.