Skip to content

0.94 regression: Cannot invoke a binary with a path that starts with ~ #13000

@jbr

Description

@jbr

Describe the bug

As of 0.94, I am no longer able to execute a command using a path that starts with ~.

❯ ~/path/to/binary
Error: nu::shell::external_command

  × External command failed
   ╭─[entry #4:1:1]
 1 │ ~/path/to/binary
   · ──────────────────┬──────────────────
   ·                   ╰── Command `~/path/to/binary` not found
   ╰────
  help: `~/path/to/binary` is neither a Nushell built-in or a known external command

Replacing ~ with $env.HOME resolves this, either directly or with path expand:

❯ exec (echo ~/path/to/binary) # fails
❯ exec (echo ~/path/to/binary | path expand) # succeeds

How to reproduce

Attempt to directly invoke a filesystem binary using a path that starts with ~ on 0.94

Expected behavior

Execute the binary

Screenshots

No response

Configuration

key value
version 0.94.0
major 0
minor 94
patch 0
branch
commit_hash
build_os macos-x86_64
build_target x86_64-apple-darwin
rust_version rustc 1.80.0-nightly (84b40fc90 2024-05-27)
rust_channel nightly-x86_64-apple-darwin
cargo_version cargo 1.80.0-nightly (a8d72c675 2024-05-24)
build_time 2024-05-28 12:49:29 -07:00
build_rust_channel release
allocator mimalloc
features default, sqlite, system-clipboard, trash, which
installed_plugins

Additional context

I conveniently had a tab open from 0.93 and was able to confirm that this behavior changed with the 0.93-0.94 release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions