Closed j4ckofalltrades closed 2 years ago
As of MILC 1.6.2, cli.config_source.info.keymap
returns argument
instead of None
, which causes this block to execute even if -km
was not specified: https://github.com/qmk/qmk_firmware/blob/master/lib/python/qmk/cli/info.py#L187
So, apologies, it's not actually a qmk_cli issue after all - it's either the CLI portion housed in qmk_firmware, or MILC.
@skullydazed
After digging into it a little more, I'm thinking the issue is partly QMK CLI, partly MILC. The first condition in the line I linked above I suspect is wrong, and should just be cli.config.info.keymap
. But also, cli.config_source.info.keymap
should be None
in this case, as it's not passed by command line argument, nor is it present in the config file.
I suspect this is the problem: https://github.com/clueboard/milc/pull/44/files#diff-f427888a58f1d4590296279a9460cd64af5f1ae875dff4257b141cb904c2f721R435
I'm thinking about this and will write up a test that catches this situation so we can fix it.
I've pushed a fix for this to MILC: https://github.com/clueboard/milc/commit/2ae9116aea3d52cc6b89ed6fc55c81b1fbca63f7
I'll cut a new release later this afternoon if the CI comes back clean.
I've released MILC 1.6.5 which should fix this. Can you give it a try?
Working on MSYS and WSL π
Describe the Bug
Running qmk info -kb throws an error if there is no -km | --keymap argument provided or no default keymap is configured via qmk config.
I tried printing out the keymap argument by adding
print('keymap (-km | --keymap): ' + cli.config_source.info.keymap)
and the result waskeymap (-km | --keymap): argument
.Additional Context?
I would say this should be filed in https://github.com/qmk/qmk_cli, except that I don't get this error with MILC 1.5.0 - only after updating to the latest version (1.6.4) do I get the same thing, and it also occurs in MSYS with:
So it is either a MILC bug, or some interaction between MILC and the QMK CLI.
_Originally posted by @fauxpark in https://github.com/qmk/qmk_firmware/issues/14509#issuecomment-922434580_