MCPcopy Create free account
hub / github.com/vercel/vercel / readBuildahStoreInfo

Function readBuildahStoreInfo

packages/container/src/storage-driver.ts:138–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136 * Read buildah's effective image store via `buildah info`.
137 */
138export 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

Callers 2

reportStorageFunction · 0.90

Calls 3

runFunction · 0.90
buildahStorageArgsFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected