INNER CODE UNIT · Python

run

jpush/jpush-react-native · .claude/skills/update-sdk/scripts/publisher.py:19

def run(cmd: list, cwd: str = ".") -> tuple:
    try:
        r = subprocess.run(cmd, cwd=cwd, capture_output=True, text=True, timeout=300)
        return r.returncode == 0, (r.stdout + r.stderr).strip()
    except subprocess.TimeoutExpired:
        return False, "Command timed out after 300 seconds"
    except Exception as e:
        return False, str(e)


def get_plugin_version(config: dict) -> str:
    refs = config.get("version_refs", {})
    for ref in refs.get("plugin", {}).get("files", []):
        path = Path(ref["path"])
        if not path.exists():
            continue
        if path.suffix == ".json":
            data = json.loads(path.read_text(encoding="utf-8"))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…