nushell / nushell/nushell

Unclosed string breaks `overlay use`

Open
#11,254 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A:parser category:bug status:needs-triage
Dominant language
Rust
Stars
40.5k
Forks
2.3k
Avg merge
1d 19h
Merged PRs (30d)
85

Description

Describe the bug

When the overlay file that is being used has a string that is unclosed, overlay use waits for more input.

How to reproduce
  1. Create a file, foo.nu with the following contents:
    const value = "This string is unclosed
    
  2. Use the file as an overlay with overlay use foo.nu
Expected behavior

When I run overlay use foo.nu, I expect to get an error message saying that the string is unclosed. However, instead it just prompts for more input:

~> overlay use foo.nu
::: 
::: 
::: 

Only Ctrl-C will close it, but it won't add the overlay.

Screenshots

image

Configuration
~> version | transpose key value | to md --pretty
| key                | value                                     |
| ------------------ | ----------------------------------------- |
| version            | 0.87.0                                    |
| branch             |                                           |
| commit_hash        |                                           |
| build_os           | linux-x86_64                              |
| build_target       | x86_64-unknown-linux-gnu                  |
| rust_version       | rustc 1.73.0 (cc66ad468 2023-10-03)       |
| rust_channel       | stable-x86_64-unknown-linux-gnu           |
| cargo_version      | cargo 1.73.0 (9c4383fb5 2023-08-26)       |
| build_time         | 2023-11-16 17:30:33 -07:00                |
| build_rust_channel | release                                   |
| allocator          | mimalloc                                  |
| features           | default, extra, sqlite, trash, which, zip |
| installed_plugins  |                                           |
Additional context

No response

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

Reproduce the issue with a foo.nu file containing the unclosed string shown in the report, then run overlay use foo.nu. Trace the overlay-use parsing path and the handling of incomplete input; done means the command reports an unclosed-string error instead of prompting for more input.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.