Skip to content

Commit

Permalink
Catch for empty BIDSCOIN_CONFIG environment variable (Github issue #226)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Feb 13, 2024
1 parent 4f0bd42 commit a9b5a52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bidscoin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
DEBUG = platform.os.getenv('BIDSCOIN_DEBUG','').upper() in ('1', 'TRUE', 'Y', 'YES')

# Create a BIDScoin user configuration directory if needed and load the BIDScoin user settings
configfile = Path(platform.os.getenv('BIDSCOIN_CONFIG', Path.home()/'.bidscoin'/__version__/'config.toml'))
configfile = Path(platform.os.getenv('BIDSCOIN_CONFIG')) or Path.home()/'.bidscoin'/__version__/'config.toml'
templatefolder = configfile.parent/'templates'
templatefolder.mkdir(parents=True, exist_ok=True)
if not configfile.is_file():
Expand Down

0 comments on commit a9b5a52

Please sign in to comment.