(value: string | undefined)
| 30 | const VALID_MODES: readonly FuseMountMode[] = ["auto", "fuse", "macfuse", "shim", "none"]; |
| 31 | |
| 32 | export 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 | |
| 42 | export async function resolveFuseBackend( |
| 43 | mode: FuseMountMode, |
no outgoing calls
no test coverage detected