Description
The mpremote
utility expects to find the .config/mpremote/config.py
file relative to the path stored in the XDG_CONFIG_HOME
environment variable first, then looks in the HOME
environment variable next if that was not defined. 1
In Windows, HOME
is not an environment variable defined by default, but the counterpart is HOMEPATH
.
I am currently able to work around this problem by manually creating a HOME
env var and setting it's value to %HOMEPATH%
, but if the mpremote
utility could be updated to either check the OS first and then use that to determine the appropriate environment variable, or use the suggestion in this StackOverflow answer 2:
from os.path import expanduser
home = expanduser("~")
If you're on Python 3.5+ you can use pathlib.Path.home():
from pathlib import Path
home = str(Path.home())
to correctly find the user's home directory, then support for user-defined commands would be enabled for all OSes.