()
| 39 | |
| 40 | @cache |
| 41 | def version() -> str: |
| 42 | output = run_cmd_output( |
| 43 | [ |
| 44 | "cargo", |
| 45 | "metadata", |
| 46 | "--format-version", |
| 47 | "1", |
| 48 | "--no-deps", |
| 49 | ] |
| 50 | ) |
| 51 | data = json.loads(output) |
| 52 | for pkg in data["packages"]: |
| 53 | if pkg["name"] == DESKTOP_PACKAGE_NAME: |
| 54 | return pkg["version"] |
| 55 | raise ValueError("Version not found") |
| 56 | |
| 57 | |
| 58 | @cache |
nothing calls this directly
no test coverage detected