INNER CODE UNIT · Python

run_command

keiyoushi/extensions-source · .github/scripts/generate-build-matrices.py:18

def run_command(command: str) -> str:
    result = subprocess.run(command, capture_output=True, text=True, shell=True)
    if result.returncode != 0:
        print(result.stderr.strip())
        sys.exit(result.returncode)
    return result.stdout.strip()


def resolve_module_suffix(ref: str, lang: str, extension: str) -> str:
    """
    returns the effective applicationId suffix of a module: the DSL override
    (pkgName) if set, else the directory-derived default
    """
    build_file = Path("src", lang, extension, "build.gradle.kts")
    content = None
    if build_file.is_file():
        content = build_file.read_text("utf-8")
    elif ref:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…