diff --git a/lib/python/qmk/cli/generate/docs.py b/lib/python/qmk/cli/generate/docs.py index 3bb7a4c9761..7abeca9d2ab 100644 --- a/lib/python/qmk/cli/generate/docs.py +++ b/lib/python/qmk/cli/generate/docs.py @@ -27,8 +27,8 @@ def generate_docs(cli): return False cli.log.info('Building vitepress docs') - run_docs_command('run', 'docs:build') + run_docs_command('run', ['docs:build']) cli.log.info('Successfully generated docs to %s.', BUILD_DOCS_PATH) if cli.args.serve: - run_docs_command('run', 'docs:preview') + run_docs_command('run', ['docs:preview']) diff --git a/lib/python/qmk/docs.py b/lib/python/qmk/docs.py index 5f0bf96bd12..75d2d60bda1 100644 --- a/lib/python/qmk/docs.py +++ b/lib/python/qmk/docs.py @@ -17,7 +17,7 @@ BUILD_DOCS_PATH = BUILD_PATH / 'docs' DOXYGEN_PATH = BUILD_DOCS_PATH / 'static' / 'doxygen' -def run_docs_command(verb, cmd=None): +def run_docs_command(verb, cmd_args=None): environ['PATH'] += pathsep + str(NODE_MODULES_PATH / '.bin') args = {'capture_output': False, 'check': True} @@ -27,8 +27,8 @@ def run_docs_command(verb, cmd=None): args['env'] = docs_env arg_list = ['yarn', verb] - if cmd: - arg_list += cmd + if cmd_args: + arg_list.extend(cmd_args) chdir(BUILDDEFS_PATH) cli.run(arg_list, **args)