Skip to content

CLI: lookup command fails with "No matching option found" on main branch #557

@sij411

Description

@sij411

Summary

The lookup command fails to parse when -a/--authorized-fetch flag is provided. main branch only, published cli worked well.

Expected Behavior

deno task cli lookup URL_OR_HANDLE on main branch should return the fetched results.

Actual Behavior

it returns Error: No matching option found

Environment

OS: Fedora Linux 43 (KDE Plasma Desktop Edition) x86_64
Kernel: Linux 6.17.1-300.fc43.x86_64
Shell: nushell 0.99.1
Terminal: ghostty 1.2.3-1.fc43

Logs / Screenshots

No response

Steps to Reproduce

  1. deno task cli lookup URL_OR_HANDLE

Suggested Fix

Wrap with withDefault() to provide a default value when neither branch matches:

  export const authorizedFetchOption = withDefault(
    object({
      authorizedFetch: map(
        flag("-a", "--authorized-fetch", { ... }),
        () => true as const,
      ),
      firstKnock: withDefault(...),
      tunnelService: tunnelServiceOption,
    }),
    { authorizedFetch: false } as const,
  );

or something else.

Affected Commands

  • lookup (confirmed)
  • Possibly inbox and relay (they have similar tunnelOption pattern)

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions