Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty? returns list of bools instead of a single bool #4786

Closed
rgwood opened this issue Mar 8, 2022 · 1 comment · Fixed by #4797
Closed

empty? returns list of bools instead of a single bool #4786

rgwood opened this issue Mar 8, 2022 · 1 comment · Fixed by #4797
Labels
🐛 bug Something isn't working
Milestone

Comments

@rgwood
Copy link
Contributor

rgwood commented Mar 8, 2022

Describe the bug

I think I've found a regression in the empty? command; if you pipe it a list, it outputs a new list instead of a scalar value.

How to reproduce

Run [red green blue] | empty?, note that it returns a list of booleans.

Expected behavior

I expected empty? to return a single boolean indicating whether the list it was given is empty.

Screenshots

image

Configuration

key value
version 0.59.1
branch main
short_commit 97b3e4a
commit_hash 97b3e4a
commit_date 2022-03-03 19:05:55 +00:00
build_os windows-x86_64
rust_version rustc 1.59.0 (9d1b2106e 2022-02-23)
rust_channel stable-x86_64-pc-windows-msvc
cargo_version cargo 1.59.0 (49d8809dc 2022-02-10)
pkg_version 0.59.1
build_time 2022-03-03 12:09:15 -08:00
build_rust_channel debug
features dataframe, default, trash, which, zip
installed_plugins

Additional context

There is an example for empty? in the docs which is how I first noticed this. https://www.nushell.sh/book/working_with_lists.html

@hustcer
Copy link
Contributor

hustcer commented Mar 9, 2022

Relevant issue: #3903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants