aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorQMK Bot <[email protected]>2024-05-16 23:06:50 +0000
committerQMK Bot <[email protected]>2024-05-16 23:06:50 +0000
commitb1ed1c6082e9a1e8c2a6e865c30cb2f3aaf31107 (patch)
tree5c94e50d5aaa72f5a3bb003f5d2839e8834b1f3f /lib
parenta9ba83c7beee3fd86d677eae5823fbb1e8b8bb30 (diff)
parent340be4bae34d35137b65f3c303f3091ede3c8938 (diff)
downloadqmk_firmware-b1ed1c6082e9a1e8c2a6e865c30cb2f3aaf31107.tar.gz
qmk_firmware-b1ed1c6082e9a1e8c2a6e865c30cb2f3aaf31107.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib')
-rw-r--r--lib/python/qmk/userspace.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/python/qmk/userspace.py b/lib/python/qmk/userspace.py
index 7e4cb847c8..1e5823b229 100644
--- a/lib/python/qmk/userspace.py
+++ b/lib/python/qmk/userspace.py
@@ -12,29 +12,29 @@ from qmk.json_encoders import UserspaceJSONEncoder
def qmk_userspace_paths():
- test_dirs = {}
+ test_dirs = set()
# If we're already in a directory with a qmk.json and a keyboards or layouts directory, interpret it as userspace
if environ.get('ORIG_CWD') is not None:
current_dir = Path(environ['ORIG_CWD'])
while len(current_dir.parts) > 1:
if (current_dir / 'qmk.json').is_file():
- test_dirs[current_dir] = True
+ test_dirs.add(current_dir)
current_dir = current_dir.parent
# If we have a QMK_USERSPACE environment variable, use that
if environ.get('QMK_USERSPACE') is not None:
- current_dir = Path(environ['QMK_USERSPACE'])
+ current_dir = Path(environ['QMK_USERSPACE']).expanduser()
if current_dir.is_dir():
- test_dirs[current_dir] = True
+ test_dirs.add(current_dir)
# If someone has configured a directory, use that
if cli.config.user.overlay_dir is not None:
- current_dir = Path(cli.config.user.overlay_dir)
+ current_dir = Path(cli.config.user.overlay_dir).expanduser().resolve()
if current_dir.is_dir():
- test_dirs[current_dir] = True
+ test_dirs.add(current_dir)
- return list(test_dirs.keys())
+ return list(test_dirs)
def qmk_userspace_validate(path):