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])
| 465 | |
| 466 | |
| 467 | def 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'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 | |
| 486 | def run_process_with_fallbacks( |
no outgoing calls
no test coverage detected