Skip to content

Commit

Permalink
Warn when configured git path does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Feb 11, 2017
1 parent 9874699 commit 010c167
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nzbhydra/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,12 @@ def _find_working_git(self):
test_cmd = 'version'

if config.settings.main.gitPath is not None:
main_git = config.settings.main.gitPath
logger.debug("Using configured git executable ath %s" % main_git)
if os.path.exists(config.settings.main.gitPath):
main_git = config.settings.main.gitPath
logger.debug("Using configured git executable path %s" % main_git)
else:
logger.warn("Configured git path %s doesn't exist. Will try to call globally" % config.settings.main.gitPath)
main_git = 'git'
else:
logger.debug("Git executable not configured, trying to call git globally")
main_git = 'git'
Expand Down

0 comments on commit 010c167

Please sign in to comment.