Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init not working on macOS #36

Open
gugahoi opened this issue Aug 25, 2019 · 6 comments · May be fixed by #41
Open

init not working on macOS #36

gugahoi opened this issue Aug 25, 2019 · 6 comments · May be fixed by #41

Comments

@gugahoi
Copy link

gugahoi commented Aug 25, 2019

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
Copy link

This happens for me as well.

@bhubr
Copy link

bhubr commented Dec 15, 2019

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

@SeedyROM
Copy link

This also is confirmable for me as well.

@ruudk
Copy link

ruudk commented Jan 16, 2020

Same issue here.

@ruudk
Copy link

ruudk commented Jan 16, 2020

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

@hlubek
Copy link
Contributor

hlubek commented Jan 29, 2020

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.

markbates added a commit that referenced this issue Sep 22, 2021
* Fix init without explicit config flag (#36)

- Config file defaults to refresh.yml
- Check if file already exists before overwriting it
- Refactor error checkin in Cobra commands

* 1.17 update

* Update tests.yml

Co-authored-by: Christopher Hlubek <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants