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

Add .sift.config location relative to the executable. #61

Closed
vovcacik opened this issue Jan 6, 2016 · 6 comments
Closed

Add .sift.config location relative to the executable. #61

vovcacik opened this issue Jan 6, 2016 · 6 comments

Comments

@vovcacik
Copy link

vovcacik commented Jan 6, 2016

Currently sift scans for config file in home directory and current working directory. Could you incorporate the directory sift.exe is in? It would improve portability.

@MiguelLatorre
Copy link

Many tools let you specify where the config file is. Something like this would be nice:

sift --config=~/path/foo.conf

@svent
Copy link
Owner

svent commented Jan 7, 2016

Thanks for the suggestions, I think they both make sense.
I currently plan to implement the following:

The config is searched for (and merged) in the following order:

  • path of the sift binary
  • user home dir
  • recursive search in the parent directories (local project config)
  • optionally the config given via --config

@abourget
Copy link

is this done ?! I'm particularly interested in the recursive search in the parent directories

@svent
Copy link
Owner

svent commented Aug 13, 2016

The search in parent directories has been implemented for a long time - I hope to release a new version supporting the --config option in the next week.

svent added a commit that referenced this issue Oct 22, 2016
@svent
Copy link
Owner

svent commented Oct 23, 2016

As of version 0.9, sift supports the --conf option.
Sift currently does not search the path of the binary - unfortunately that feature would require to use platform dependent, unsafe code outside the Go standard library, so I will not (yet) implement that for stability reasons.

@svent svent closed this as completed Oct 23, 2016
@vovcacik
Copy link
Author

vovcacik commented Mar 3, 2018

Works fine for me, thx.

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

No branches or pull requests

4 participants