Attempt to fix configurator. (#22555)
This commit is contained in:
parent
0115951de1
commit
049e964e61
1 changed files with 7 additions and 6 deletions
|
@ -15,6 +15,7 @@ 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 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'])
|
current_dir = Path(environ['ORIG_CWD'])
|
||||||
while len(current_dir.parts) > 1:
|
while len(current_dir.parts) > 1:
|
||||||
if (current_dir / 'qmk.json').is_file():
|
if (current_dir / 'qmk.json').is_file():
|
||||||
|
@ -23,7 +24,7 @@ def qmk_userspace_paths():
|
||||||
|
|
||||||
# If we have a QMK_USERSPACE environment variable, use that
|
# If we have a QMK_USERSPACE environment variable, use that
|
||||||
if environ.get('QMK_USERSPACE') is not None:
|
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():
|
if current_dir.is_dir():
|
||||||
test_dirs.append(current_dir)
|
test_dirs.append(current_dir)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue