mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 21:01:31 +00:00
Don't accidentally resolve qmk_firmware as userspace if it's the current working directory.
This commit is contained in:
parent
5477193489
commit
da39824043
@ -16,6 +16,7 @@ def _detect_qmk_userspace():
|
|||||||
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 / 'Makefile').is_file() and ((current_dir / 'keyboards').is_dir() or (current_dir / 'layouts').is_dir()):
|
if (current_dir / 'Makefile').is_file() and ((current_dir / 'keyboards').is_dir() or (current_dir / 'layouts').is_dir()):
|
||||||
|
if current_dir.resolve() != Path(QMK_FIRMWARE).resolve():
|
||||||
return current_dir
|
return current_dir
|
||||||
current_dir = current_dir.parent
|
current_dir = current_dir.parent
|
||||||
# Otherwise, use the environment variable or the configured default
|
# Otherwise, use the environment variable or the configured default
|
||||||
|
Loading…
Reference in New Issue
Block a user