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 sane default instance dir, make configurable #52

Closed
wants to merge 1 commit into from
Closed

Add sane default instance dir, make configurable #52

wants to merge 1 commit into from

Conversation

jdevera
Copy link

@jdevera jdevera commented Apr 10, 2014

Use a non privileged directory for the app instance. Use ~/.cache/grip
by default but allow the user to specify an alternative directory with
the --app-dir option.

Fixes #38

Use a non privileged directory for the app instance. Use ~/.cache/grip
by default but allow the user to specify an alternative directory with
the --app-dir option.

Fixes #38
@kynan
Copy link

kynan commented Jun 2, 2014

That is essential when grip has been installed system wide. You certainly don't want to run with sudo!

@kynan kynan mentioned this pull request Jun 2, 2014
@nodiscc
Copy link

nodiscc commented Jul 9, 2014

Can this be merged? grip installed from pip is still broken on Debian 8 (jessie)

if app_dir is not None:
instance_path = os.path.abspath(app_dir)
else:
instance_path = os.path.expanduser("~/.cache/grip")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use os.path.join('~/.cache/grip') for cross-platform paths?

@joeyespo
Copy link
Owner

Ok. Will do once that comment is resolved.

@joeyespo
Copy link
Owner

Also, is ~/.cache/grip the norm for application settings, or should it be simply ~/.grip?

@joeyespo
Copy link
Owner

Hey @jdevera. First off, thanks for opening up this pull request. I pulled in #39 for now so nobody needs to use sudo to install grip anymore. (Also, there's still some cross-platform bugs in this PR and I'm still uncertain whether ~/.cache is the right place to put Grip's settings.)

I'm curious though. And anyone in this thread can speak up. Why does grip's config directory need to be configurable? Aside from name collisions--which we'll cross that bridge when we get there--what other compelling reasons are there for configuring this location?

Like I mentioned in #38, I'd like to have a good reason before introducing another configuration option, since each one makes the project just a little more complex.

@joeyespo
Copy link
Owner

joeyespo commented Aug 8, 2014

Closing this due to inactivity. Thanks, all.

@joeyespo
Copy link
Owner

joeyespo commented Jun 1, 2015

FYI, just pulled in a similar change that uses an environment variable instead of a CLI option in #117. This lets it be configurable while keeping the common case clean.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default settings try to use /usr/var as the cache path
4 participants