MCPcopy Index your code
hub / github.com/reflex-dev/reflex / get_command_with_loglevel

Function get_command_with_loglevel

reflex/utils/processes.py:467–483  ·  view source on GitHub ↗

Add the right loglevel flag to the designated command. npm uses --loglevel , Bun doesn't use the --loglevel flag and runs in debug mode by default. Args: command:The command to add loglevel flag. Returns: The updated command list

(command: list[str])

Source from the content-addressed store, hash-verified

465
466
467def get_command_with_loglevel(command: list[str]) -> list[str]:
468 """Add the right loglevel flag to the designated command.
469 npm uses --loglevel <level>, Bun doesn&#x27;t use the --loglevel flag and
470 runs in debug mode by default.
471
472 Args:
473 command:The command to add loglevel flag.
474
475 Returns:
476 The updated command list
477 """
478 npm_path = path_ops.get_npm_path()
479 npm_path = str(npm_path) if npm_path else None
480
481 if command[0] == npm_path:
482 return [*command, "--loglevel", "silly"]
483 return command
484
485
486def run_process_with_fallbacks(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected