A convenient CLI tool to quickly spin up DragonflyBSD virtual machines using QEMU with sensible defaults.
at main 19 lines 561 B view raw
1import { Effect, pipe } from "effect"; 2import { pushImage, setupOrasBinary } from "../oras.ts"; 3import { validateImage } from "../utils.ts"; 4 5export default async function (image: string): Promise<void> { 6 await Effect.runPromise( 7 pipe( 8 Effect.promise(() => setupOrasBinary()), 9 Effect.tap(() => validateImage(image)), 10 Effect.tap(() => pushImage(image)), 11 Effect.catchAll((error) => 12 Effect.sync(() => { 13 console.error(`Failed to push image: ${error.cause}`); 14 Deno.exit(1); 15 }) 16 ), 17 ), 18 ); 19}