diff --git a/.changeset/cool-poems-tickle.md b/.changeset/cool-poems-tickle.md new file mode 100644 index 0000000..c1614c6 --- /dev/null +++ b/.changeset/cool-poems-tickle.md @@ -0,0 +1,5 @@ +--- +"@effect/docgen": patch +--- + +Core: do not swallow examples errors diff --git a/docs/modules/Core.ts.md b/docs/modules/Core.ts.md index 7b64f5c..2260486 100644 --- a/docs/modules/Core.ts.md +++ b/docs/modules/Core.ts.md @@ -24,7 +24,7 @@ Added in v1.0.0 **Signature** ```ts -export declare const main: Effect.Effect +export declare const main: Effect.Effect ``` Added in v1.0.0 diff --git a/src/Core.ts b/src/Core.ts index cca3c6e..83c26e6 100644 --- a/src/Core.ts +++ b/src/Core.ts @@ -4,7 +4,7 @@ import { Path } from "@effect/platform-node" import chalk from "chalk" -import { Console, Effect, Layer, Logger, LogLevel, ReadonlyArray, String } from "effect" +import { Effect, Layer, Logger, LogLevel, ReadonlyArray, String } from "effect" import * as ChildProcess from "./CommandExecutor.js" import * as Config from "./Config.js" import type * as Domain from "./Domain.js" @@ -438,12 +438,8 @@ const MainLayer = Config.ConfigLive.pipe(Layer.provideMerge(Layer.mergeAll( Process.ProcessLive ))) -const runnable = program.pipe(Effect.provide(MainLayer)) - /** * @category main * @since 1.0.0 */ -export const main: Effect.Effect = runnable.pipe( - Effect.catchAll((error) => Console.error(chalk.bold.red("Error:"), error.message)) -) +export const main: Effect.Effect = program.pipe(Effect.provide(MainLayer))