Skip to content

From Discord: Bug in Effect CLI: --log-level=debug Argument Parsing Swallows Next Argument #6103

@effect-bot

Description

@effect-bot

Summary

A user reported a bug in the @effect/cli tool where using the '--log-level=debug' argument (with an '=' sign) causes the parser to incorrectly consume the next argument as well. The SetLogLevel handler removes '--log-level' flags before re-parsing, but due to a faulty check that matches '--log-level=debug', it removes the next argument unintentionally. For example, running 'bun effect-cli-log-level-bug.ts --log-level=debug --name=hello' results in '--name=hello' being ignored. The workaround is to use space-separated arguments like '--log-level debug --name=hello'. This issue highlights the need to properly parse and strip arguments when they contain '=' syntax to avoid swallowing subsequent flags.

Discord thread

https://discord.com/channels/795981131316985866/1478450569369620510

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions