Skip to content

Commit

Permalink
Update 'qmk env'
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr committed Jun 23, 2024
1 parent 3e9d726 commit aa8f663
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qmk_cli/subcommands/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
from pathlib import Path

from milc import cli
from qmk_cli.helpers import is_qmk_firmware
from qmk_cli.helpers import is_qmk_firmware, is_qmk_userspace


@cli.argument('var', arg_only=True, default=None, nargs='?', help='Optional variable to query')
@cli.subcommand('Prints environment information.')
def env(cli):
home = os.environ.get('QMK_HOME', "")
userspace = os.environ.get('QMK_USERSPACE', "")
data = {
'QMK_HOME': home,
'QMK_FIRMWARE': home if is_qmk_firmware(Path(home)) else ""
'QMK_FIRMWARE': home if is_qmk_firmware(Path(home)) else "",
'QMK_USERSPACE': userspace if is_qmk_userspace(Path(userspace)) else ""
}

# Now munge the current cli config
Expand Down

0 comments on commit aa8f663

Please sign in to comment.