Skip to content

Fix error in non-home paths#1129

Merged
fdncred merged 1 commit into
nushell:mainfrom
samoylovfp:patch-2
Jun 9, 2025
Merged

Fix error in non-home paths#1129
fdncred merged 1 commit into
nushell:mainfrom
samoylovfp:patch-2

Conversation

@samoylovfp

Copy link
Copy Markdown
Contributor

Before it would fail in paths outside the home directory with

 × Pipeline empty.
    ╭─[/home/filipp/.config/nushell/panache-git.nu:32:76]
 31 │   let current_dir_relative_to_home = (
 32 │     do --ignore-errors { $current_dir | path relative-to $nu.home-path } | str join
    ·                                                                            ────┬───
    ·                                                                                ╰── no input value was piped in
 33 │   )
    ╰────

Before it would fail in paths outside the home directory with

```
 × Pipeline empty.
    ╭─[/home/filipp/.config/nushell/panache-git.nu:32:76]
 31 │   let current_dir_relative_to_home = (
 32 │     do --ignore-errors { $current_dir | path relative-to $nu.home-path } | str join
    ·                                                                            ────┬───
    ·                                                                                ╰── no input value was piped in
 33 │   )
    ╰────
```
@fdncred
fdncred merged commit 2e39c27 into nushell:main Jun 9, 2025
1 check passed
@fdncred

fdncred commented Jun 9, 2025

Copy link
Copy Markdown
Contributor

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants