Skip to content

Commit

Permalink
Merge pull request #117 from zmwangx/master
Browse files Browse the repository at this point in the history
Introduce environment variable GRIPHOME for greater customizability of instance_path
  • Loading branch information
joeyespo committed May 3, 2015
2 parents 093f908 + abf3816 commit bf91ec2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion grip/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ def resolve_readme(path=None, force=False):


def _create_flask():
instance_path = os.path.abspath(os.path.expanduser('~/.grip'))
if 'GRIPHOME' in os.environ:
instance_path = os.environ['GRIPHOME']
else:
instance_path = os.path.abspath(os.path.expanduser('~/.grip'))
user_settings = os.path.join(instance_path, 'settings.py')
default_static_url_path = '/grip-static'

Expand Down

0 comments on commit bf91ec2

Please sign in to comment.