Skip to content

Commit

Permalink
Make docs command args always a list
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark committed Nov 20, 2024
1 parent 2092b0a commit 79d9660
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/python/qmk/cli/generate/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
6 changes: 3 additions & 3 deletions lib/python/qmk/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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}
Expand All @@ -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)
Expand Down

0 comments on commit 79d9660

Please sign in to comment.