diff options
| author | QMK Bot <hello@qmk.fm> | 2024-06-24 02:30:03 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2024-06-24 02:30:03 +0000 |
| commit | c973ee1445c5121fcf2dfdbf7ffcd1a6b7a8ed9c (patch) | |
| tree | 156168ecd5edacf6233adf85bf306e266d0ca3e8 /lib | |
| parent | d4e98e9fda8ed2547f0742a8242ac8724a6dcbee (diff) | |
| parent | 03e688e91f28d73416ada41c6db209c04d18cba7 (diff) | |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/qmk/cli/__init__.py | 1 | ||||
| -rwxr-xr-x | lib/python/qmk/cli/userspace/path.py | 8 | ||||
| -rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index b656909f85..a64f90c29b 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py | |||
| @@ -87,6 +87,7 @@ subcommands = [ | |||
| 87 | 'qmk.cli.userspace.compile', | 87 | 'qmk.cli.userspace.compile', |
| 88 | 'qmk.cli.userspace.doctor', | 88 | 'qmk.cli.userspace.doctor', |
| 89 | 'qmk.cli.userspace.list', | 89 | 'qmk.cli.userspace.list', |
| 90 | 'qmk.cli.userspace.path', | ||
| 90 | 'qmk.cli.userspace.remove', | 91 | 'qmk.cli.userspace.remove', |
| 91 | 'qmk.cli.via2json', | 92 | 'qmk.cli.via2json', |
| 92 | ] | 93 | ] |
diff --git a/lib/python/qmk/cli/userspace/path.py b/lib/python/qmk/cli/userspace/path.py new file mode 100755 index 0000000000..df4648e8c7 --- /dev/null +++ b/lib/python/qmk/cli/userspace/path.py | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | from milc import cli | ||
| 2 | from qmk.constants import QMK_USERSPACE | ||
| 3 | |||
| 4 | |||
| 5 | @cli.subcommand('Detected path to QMK Userspace.', hidden=True) | ||
| 6 | def userspace_path(cli): | ||
| 7 | print(QMK_USERSPACE) | ||
| 8 | return | ||
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 1725e3ea79..8b50d1c340 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py | |||
| @@ -249,7 +249,7 @@ def test_c2json_nocpp_stdin(): | |||
| 249 | def test_clean(): | 249 | def test_clean(): |
| 250 | result = check_subcommand('clean', '-a') | 250 | result = check_subcommand('clean', '-a') |
| 251 | check_returncode(result) | 251 | check_returncode(result) |
| 252 | assert result.stdout.count('done') == 2 | 252 | assert (result.stdout.count('done') == 2 and 'userspace' not in result.stdout) or (result.stdout.count('done') == 3 and 'userspace' in result.stdout) |
| 253 | 253 | ||
| 254 | 254 | ||
| 255 | def test_generate_api(): | 255 | def test_generate_api(): |
