Skip to content

Commit

Permalink
Use USERSPROFILE and ALLUSERSPROFILE on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed May 26, 2020
1 parent c82be47 commit a5d1664
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions jupytext/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,16 @@ def global_jupytext_configuration_directories():

if "XDG_CONFIG_HOME" in os.environ:
config_dirs.extend(os.environ["XDG_CONFIG_HOME"].split(":"))
elif "USERPROFILE" in os.environ:
config_dirs.append(os.environ["USERPROFILE"])
elif "HOME" in os.environ:
config_dirs.append(os.path.join(os.environ["HOME"], ".config"))
config_dirs.append(os.environ["HOME"])

if "XDG_CONFIG_DIRS" in os.environ:
config_dirs.extend(os.environ["XDG_CONFIG_DIRS"].split(":"))
elif "ALLUSERSPROFILE" in os.environ:
config_dirs.append(os.environ["ALLUSERSPROFILE"])
else:
config_dirs.extend(["/usr/local/share/", "/usr/share/"])

Expand Down
2 changes: 1 addition & 1 deletion jupytext/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Jupytext's version number"""

__version__ = "1.5.0.rc1"
__version__ = "1.5.0.rc1+dev"

0 comments on commit a5d1664

Please sign in to comment.