tools/android/dependency_analysis/subprocess_utils.py
def run_command(command: List[str]) -> str:
    """Runs a command and returns the output.

    Raises an exception and prints the command output if the command fails."""
    try:
        run_result = subprocess.run(command,
                                    capture_output=True,
                                    text=True,
                                    check=True)
    except subprocess.CalledProcessError as e:
        print(f'{command} failed with code {e.returncode}.', file=sys.stderr)
        print(f'\nSTDERR:\n{e.stderr}', file=sys.stderr)
        print(f'\nSTDOUT:\n{e.stdout}', file=sys.stderr)
        raise
    return run_result.stdout
Runs a command and returns the output.

    Raises an exception and prints the command output if the command fails.
Runs a command and returns the output.
Raises an exception and prints the command output if the command fails.
Runs a command and returns the output . Raises an exception and prints the command output if the command fails .
def run_command(command: List[str]) -> str:
    try:
        run_result = subprocess.run(command,
                                    capture_output=True,
                                    text=True,
                                    check=True)
    except subprocess.CalledProcessError as e:
        print(f'{command} failed with code {e.returncode}.', file=sys.stderr)
        print(f'\nSTDERR:\n{e.stderr}', file=sys.stderr)
        print(f'\nSTDOUT:\n{e.stdout}', file=sys.stderr)
        raise
    return run_result.stdout
def run_command ( command : List [ str ] ) -> str : try : run_result = subprocess . run ( command , capture_output = True , text = True , check = True ) except subprocess . CalledProcessError as e : print ( f'{command} failed with code {e.returncode}.' , file = sys . stderr ) print ( f'\nSTDERR:\n{e.stderr}' , file = sys . stderr ) print ( f'\nSTDOUT:\n{e.stdout}' , file = sys . stderr ) raise return run_result . stdout
Runs a command and returns the output.
Runs a command and returns the output .
"""Runs a command and returns the output.

    Raises an exception and prints the command output if the command fails."""
command
List[str]