Skip to content

nushell doesn't raise error if we pass incorrect flag value type #11310

Closed

Description

@WindSoilder

Describe the bug

When we define a custom command with flags, and pass a variable(with incorrect value type) when run that custom command. No error happened

How to reproduce

  1. def a [--x: int = 3] { "aa" }
  2. let y = "aa"
  3. a --x=$y

It doesn't output error

Expected behavior

I expect nushell to raise parse error.

Screenshots

No response

Configuration

key value
version 0.88.0
branch nightly
commit_hash d43f425
build_os macos-x86_64
build_target x86_64-apple-darwin
rust_version rustc 1.72.1 (d5c2e9c34 2023-09-13)
rust_channel 1.72.1-x86_64-apple-darwin
cargo_version cargo 1.72.1 (103a7ff2e 2023-08-15)
build_time 2023-12-13 01:46:16 +00:00
build_rust_channel release
allocator mimalloc
features dataframe, default, extra, sqlite, static-link-openssl, trash, which, zip
installed_plugins

Additional context

No response

Activity

  1. added
    status:needs-triage
    on Dec 13, 2023
  2. added
    category:bug
    A:type-system
    and removed
    status:needs-triage
    on Dec 13, 2023
  3. added a commit that references this issue on Dec 20, 2023
    697f3c0
  4. added this to the v0.89.0 milestone on Dec 20, 2023
  5. added a commit that references this issue on Feb 20, 2024
    89e817e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:type-systemcategory:bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions