Skip to content

Fix error in non-home paths #1129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged

Fix error in non-home paths #1129

merged 1 commit into from
Jun 9, 2025

Conversation

samoylovfp
Copy link
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
Copy link
Contributor

fdncred commented Jun 9, 2025

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