zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
39.46k stars 2.06k forks source link

test runner does not work when shell = `nu` #12685

Open universalmind303 opened 1 month ago

universalmind303 commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Error: nu::parser::parse_mismatch

  × Parse mismatch during operation.
   ╭─[source:1:15]
 1 │ cargo test -p ${ZED_CUSTOM_RUST_PACKAGE} $ZED_SYMBOL -- --nocapture
   ·               ─────────────┬────────────
   ·                            ╰── expected valid variable name
   ╰────

⏵ Task `cargo test -p arrow2 test_primitive_array_eq -- --nocapture` finished with non-zero error code: 1
⏵ Command: 'nu -i -c `cargo test -p arrow2 test_primitive_array_eq -- --nocapture`'

related to https://github.com/zed-industries/zed/issues/12617.

Environment

Zed: v0.137.6 (Zed) OS: macOS 14.4.0 Memory: 32 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

osiewicz commented 1 month ago

That's fixed in latest Preview == it should be fixed on Stable (which you're using) in todays update.

universalmind303 commented 1 month ago

@osiewicz This is still an issue for nu on the latest release

Error: nu::parser::env_var_not_var

  × Use $env.ZED_CUSTOM_RUST_PACKAGE instead of $ZED_CUSTOM_RUST_PACKAGE.
   ╭─[source:1:15]
 1 │ cargo test -p $ZED_CUSTOM_RUST_PACKAGE $ZED_SYMBOL -- --nocapture
   ·               ────────────┬───────────
   ·                           ╰── use $env.ZED_CUSTOM_RUST_PACKAGE instead of $ZED_CUSTOM_RUST_PACKAGE
   ╰────

⏵ Task `cargo test -p arrow2 test_merge_reversed -- --nocapture` finished with non-zero error code: 1
⏵ Command: 'nu -i -c `cargo test -p arrow2 test_merge_reversed -- --nocapture`'