MCPcopy Create free account
hub / github.com/cloudflare/computer / parseFuseMountMode

Function parseFuseMountMode

packages/computerd/src/fuse/backend.ts:32–40  ·  view source on GitHub ↗
(value: string | undefined)

Source from the content-addressed store, hash-verified

30const VALID_MODES: readonly FuseMountMode[] = ["auto", "fuse", "macfuse", "shim", "none"];
31
32export function parseFuseMountMode(value: string | undefined): FuseMountMode {
33 if (value === undefined || value === "") return "auto";
34 if ((VALID_MODES as readonly string[]).includes(value)) {
35 return value as FuseMountMode;
36 }
37 throw new Error(
38 `FUSE_MOUNT must be one of ${VALID_MODES.join(", ")}; got ${JSON.stringify(value)}`,
39 );
40}
41
42export async function resolveFuseBackend(
43 mode: FuseMountMode,

Callers 2

mainFunction · 0.85
backend.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected