Skip to content

Bug: --web flag broken due to -w short flag collision with --workspace #174

@bnaul

Description

@bnaul

Summary

linear issue view --web DATA-6114 (and -w) fails with:

workspace is not set via command line, configuration file, or environment.

The --web flag is being parsed as --workspace because both share the -w short flag.

Root Cause

The -w short flag is registered in two places:

  1. Global option in src/main.ts:34-w, --workspace <slug:string> (added in 540818c)
  2. Command-level option in e.g. src/commands/issue/issue-view.ts:36-w, --web (added in a4a9a54)

Cliffy resolves global options first, so -w always maps to --workspace. The full --web flag also fails, likely due to prefix matching (--web is a prefix of --workspace — though both are distinct, the global option takes precedence in Cliffy's parser).

Affected Commands (all 8 with --web)

  • issue view, issue list
  • project view, project list
  • team list
  • document view
  • initiative list, initiative view

Reproduction

$ linear issue view --web DATA-6114
workspace is not set via command line, configuration file, or environment.

$ linear issue view DATA-6114  # works fine

Suggested Fix

Remove the -w short flag from --web (or change it to e.g. -b for browser), since --workspace is the global flag documented in the auth flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions