()
| 136 | * Read buildah's effective image store via `buildah info`. |
| 137 | */ |
| 138 | export async function readBuildahStoreInfo(): Promise< |
| 139 | BuildahStoreInfo | undefined |
| 140 | > { |
| 141 | const args = await buildahStorageArgs(); |
| 142 | const { stdout } = await run('buildah', [...args, 'info'], { quiet: true }); |
| 143 | const store = (JSON.parse(stdout) as { store?: Record<string, unknown> }) |
| 144 | .store; |
| 145 | if (!store) { |
| 146 | return undefined; |
| 147 | } |
| 148 | const graphStatus = store.GraphStatus as Record<string, string> | undefined; |
| 149 | return { |
| 150 | graphRoot: String(store.GraphRoot ?? ''), |
| 151 | runRoot: String(store.RunRoot ?? ''), |
| 152 | driver: String(store.GraphDriverName ?? ''), |
| 153 | backingFs: String( |
| 154 | graphStatus?.['Backing Filesystem'] ?? |
| 155 | graphStatus?.['Backing filesystem'] ?? |
| 156 | '' |
| 157 | ), |
| 158 | }; |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * In the build container, report whether buildah came up with the intended |
no test coverage detected