Browse Source

shell quotes

pull/22887/head
Nick Brassel 2 weeks ago
parent
commit
53bc15ef42
Failed to extract signature
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      lib/python/qmk/cli/mass_compile.py

+ 2
- 1
lib/python/qmk/cli/mass_compile.py View File

@ -7,6 +7,7 @@ from typing import List
from pathlib import Path
from subprocess import DEVNULL
from milc import cli
import shlex
from qmk.constants import QMK_FIRMWARE
from qmk.commands import find_make, get_make_parallel_args, build_environment
@ -25,7 +26,7 @@ def mass_compile_targets(targets: List[BuildTarget], clean: bool, dry_run: bool,
if dry_run:
cli.log.info('Compilation targets:')
for target in sorted(targets, key=lambda t: (t.keyboard, t.keymap)):
extra_args = ' '.join([f"-e '{k}={v}'" for k, v in target.extra_args.items()])
extra_args = ' '.join([f"-e {shlex.quote(f'{k}={v}')}" for k, v in target.extra_args.items()])
cli.log.info(f"{{fg_cyan}}qmk compile -kb {target.keyboard} -km {target.keymap} {extra_args}{{fg_reset}}")
else:
if clean:


Loading…
Cancel
Save