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

Fix #38 #39

Merged
merged 3 commits into from
Jul 20, 2014
Merged

Fix #38 #39

merged 3 commits into from
Jul 20, 2014

Conversation

swsnider
Copy link
Contributor

@swsnider swsnider commented Nov 7, 2013

Explicitly set the instance_path parameter to Flask so that when the app is installed, it doesn't try to write to a privileged directory.

Explicitly set the instance_path parameter to Flask so that when the app is installed, it doesn't try to write to a privileged directory.
Previously, this would have created a '~' directory in the current dir. Now, this resolves homedirs first.
@@ -22,7 +22,7 @@ def create_app(path=None, gfm=False, context=None, username=None, password=None,
raise ValueError('File not found: ' + path)

# Flask application
app = Flask(__name__)
app = Flask(__name__, instance_path=os.abspath(os.path.expanduser("~/.grip")))
Copy link

Choose a reason for hiding this comment

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

Shouldn't that be os.path.abspath?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I'll fix the patch.

@RSTJNII
Copy link

RSTJNII commented Jan 23, 2014

+1

@kynan
Copy link

kynan commented Jun 2, 2014

I think #52 implements a better solution.

@joeyespo
Copy link
Owner

@kynan Can you explain why you think that's a better solution? Is there any situation where you need to change the instance directory away from ~/.grip?

I'm going to merge this variation in until there's a compelling reason to add another configuration option. Every option makes the project just a little bit more complex.

joeyespo added a commit that referenced this pull request Jul 20, 2014
@joeyespo joeyespo merged commit ca5e49d into joeyespo:master Jul 20, 2014
@joeyespo
Copy link
Owner

Thanks for the PR, @swsnider!

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.

5 participants