Skip to content

[@effect/cli] Passing --log-level flag hangs the program #5659

@nemmtor

Description

@nemmtor

What version of Effect is running?

3.18.4

What steps can reproduce the bug?

import * as Command from "@effect/cli/Command";
import * as NodeContext from "@effect/platform-node/NodeContext";
import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
import * as Effect from "effect/Effect";

const program = Effect.logInfo("Hello world");

const command = Command.make("foo");
export const cli = command.pipe(
  Command.withHandler(() => program),
  Command.run({
    name: "CLI issue reproduction",
    version: "v0.0.1",
  }),
);

cli(process.argv).pipe(Effect.provide(NodeContext.layer), NodeRuntime.runMain);

Running the program with --log-level=debug or any other value for log level makes the program to hang.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions