Skip to content

Commit

Permalink
Merge pull request #19 from moduon/autoshare-mode-keyerror
Browse files Browse the repository at this point in the history
fix: avoid KeyError when there's no $GIT_AUTOSHARE_MODE
  • Loading branch information
sbidoul authored Feb 25, 2022
2 parents 5efdbd9 + c63dd3d commit cac244f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git_autoshare/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def cache_dir():

def config():
global _config
test_mode = os.environ["GIT_AUTOSHARE_MODE"] == "test"
test_mode = os.environ.get("GIT_AUTOSHARE_MODE") == "test"
if not test_mode and _config is not None:
return _config
config_dir = os.environ.get("GIT_AUTOSHARE_CONFIG_DIR") or appdirs.user_config_dir(
Expand Down

0 comments on commit cac244f

Please sign in to comment.