mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
Make docs command args always a list
This commit is contained in:
parent
2092b0a993
commit
79d9660812
@ -27,8 +27,8 @@ def generate_docs(cli):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
cli.log.info('Building vitepress docs')
|
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)
|
cli.log.info('Successfully generated docs to %s.', BUILD_DOCS_PATH)
|
||||||
|
|
||||||
if cli.args.serve:
|
if cli.args.serve:
|
||||||
run_docs_command('run', 'docs:preview')
|
run_docs_command('run', ['docs:preview'])
|
||||||
|
@ -17,7 +17,7 @@ BUILD_DOCS_PATH = BUILD_PATH / 'docs'
|
|||||||
DOXYGEN_PATH = BUILD_DOCS_PATH / 'static' / 'doxygen'
|
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')
|
environ['PATH'] += pathsep + str(NODE_MODULES_PATH / '.bin')
|
||||||
|
|
||||||
args = {'capture_output': False, 'check': True}
|
args = {'capture_output': False, 'check': True}
|
||||||
@ -27,8 +27,8 @@ def run_docs_command(verb, cmd=None):
|
|||||||
args['env'] = docs_env
|
args['env'] = docs_env
|
||||||
|
|
||||||
arg_list = ['yarn', verb]
|
arg_list = ['yarn', verb]
|
||||||
if cmd:
|
if cmd_args:
|
||||||
arg_list += cmd
|
arg_list.extend(cmd_args)
|
||||||
|
|
||||||
chdir(BUILDDEFS_PATH)
|
chdir(BUILDDEFS_PATH)
|
||||||
cli.run(arg_list, **args)
|
cli.run(arg_list, **args)
|
||||||
|
Loading…
Reference in New Issue
Block a user