File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,8 @@ Shortcuts can be defined using the macro system. Built-in shortcuts are::
222
222
- ``bootloader ``: make the device enter its bootloader
223
223
224
224
Any user configuration, including user-defined shortcuts, can be placed in the file
225
- ``.config/mpremote/config.py ``. For example:
225
+ ``.config/mpremote/config.py``(relative to the ``XDG_CONFIG_HOME ``, ``HOME ``, or ``USERPROFILE `` environment variable).
226
+ For example:
226
227
227
228
.. code-block :: python3
228
229
Original file line number Diff line number Diff line change @@ -333,7 +333,12 @@ def load_user_config():
333
333
config .commands = {}
334
334
335
335
# Get config file name.
336
- path = os .getenv ("XDG_CONFIG_HOME" )
336
+ if os .name == "nt" :
337
+ path = os .getenv ("USERPROFILE" )
338
+ if path is None :
339
+ return config
340
+ else :
341
+ path = os .getenv ("XDG_CONFIG_HOME" )
337
342
if path is None :
338
343
path = os .getenv ("HOME" )
339
344
if path is None :
You can’t perform that action at this time.
0 commit comments