nushell / nushell/nushell

`update cells` doesn't throw errors, inserts error in output record instead

Open
#16,961 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A:error-handling A:error-silent-fail status:needs-triage
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 14h
Merged PRs (30d)
79

Description

Bug report form
  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.
Describe the bug

it seems that when invoking the closure in update cells, it doesn't throw errors as it should. instead it writes the error into the returned record.
that makes for some confusing output, imho.

possibly related to #16803

How to reproduce

{a: 1} | update cells { foobar }

results in

╭───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ a │ ExternalCommand { label: "Command `foobar` not found", help: "Did you mean `foo`?", span: Span { start: 155642, end: 155648 } } │
╰───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Expected behavior

nushell should throw errors as soon as they are encountered

Configuration
key value
version 0.108.0
major 0
minor 108
patch 0
branch
commit_hash da141be11b3acaa55b39321e5f9651d02aa2ed6f
build_os macos-aarch64
build_target aarch64-apple-darwin
rust_version rustc 1.88.0 (6b00bc388 2025-06-23)
rust_channel 1.88.0-aarch64-apple-darwin
cargo_version cargo 1.88.0 (873a06493 2025-05-10)
build_time 2025-10-15 12:07:36 +00:00
build_rust_channel release
allocator standard
features default, network, plugin, rustls-tls, sqlite, static-link-openssl, trash-support
installed_plugins bexpand 1.3.10400, compress 0.2.6, formats 0.104.0, gstat 0.104.0, highlight 1.4.9+0.107.0, inc 0.104.0, jwalk 0.17.0, polars 0.104.0, query 0.104.0, regex 0.16.0, skim 0.11.1, strutils 0.12.0
experimental_options example=false, reorder-cell-paths=true, pipefail=false, enforce-runtime-annotations=false

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing {a: 1} | update cells { foobar } and compare its output with the expected error behavior. Trace the update cells closure invocation and error handling, then verify that the command reports the foobar error instead of inserting it into the returned record.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, shell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.