Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix configurator. #22555

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions lib/python/qmk/userspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ def qmk_userspace_paths():
test_dirs = []

# If we're already in a directory with a qmk.json and a keyboards or layouts directory, interpret it as userspace
current_dir = Path(environ['ORIG_CWD'])
while len(current_dir.parts) > 1:
if (current_dir / 'qmk.json').is_file():
test_dirs.append(current_dir)
current_dir = current_dir.parent
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)
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.get('QMK_USERSPACE'))
current_dir = Path(environ['QMK_USERSPACE'])
if current_dir.is_dir():
test_dirs.append(current_dir)

Expand Down