Skip to content

Commit

Permalink
🚑 Bug fix release
Browse files Browse the repository at this point in the history
* Fix sourcing virtual envs in Bourne shell
* Also allow loading directory to change to from config file
  • Loading branch information
bbelyeu committed Sep 15, 2017
1 parent 03bf5d3 commit c395434
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions crony/crony.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import requests
from raven.handlers.logging import SentryHandler

__version__ = '0.1.0'
__version__ = '0.1.1'


class CommandCenter(object):
Expand Down Expand Up @@ -138,9 +138,10 @@ def run(self):

def setup_dir(self):
"""Change directory for script if necessary."""
if self.opts.cd:
self.logger.debug(f'Adding cd to {self.opts.cd}')
self.cmd = f'cd {self.opts.cd} && {self.cmd}'
cd = self.opts.cd or self.config['crony'].get('directory')
if cd:
self.logger.debug(f'Adding cd to {cd}')
self.cmd = f'cd {cd} && {self.cmd}'

def setup_logging(self):
"""Setup python logging handler."""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'Topic :: Utilities'
],
description='Python command line application bare bones template.',
download_url='https://github.com/youversion/crony/archive/0.1.0.zip',
download_url=f'https://github.com/youversion/crony/archive/{version}.zip',
entry_points={'console_scripts': ['crony = crony.crony:main']},
license='MIT',
long_description=long_descr,
Expand Down

0 comments on commit c395434

Please sign in to comment.