summaryrefslogtreecommitdiff
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2023-12-02 22:47:08 +0000
committerQMK Bot <hello@qmk.fm>2023-12-02 22:47:08 +0000
commitc7a58bf2801b64a4e928089f7afe991b2d17f154 (patch)
tree4df86e7c2f5144d93691e0edc263417964675c9c /lib/python/qmk
parentb45b3aaec73f17735a8211eb5b9114b1c617848f (diff)
parent01eed8d5d8dc82703b769206c5c08d07a6042b7b (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib/python/qmk')
-rw-r--r--lib/python/qmk/userspace.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/python/qmk/userspace.py b/lib/python/qmk/userspace.py
index 103f11b99a..7e4cb847c8 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 = {}
# 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.append(current_dir)
+ test_dirs[current_dir] = True
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'])
if current_dir.is_dir():
- test_dirs.append(current_dir)
+ test_dirs[current_dir] = True
# 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)
if current_dir.is_dir():
- test_dirs.append(current_dir)
+ test_dirs[current_dir] = True
- return test_dirs
+ return list(test_dirs.keys())
def qmk_userspace_validate(path):