Skip to content

Commit 2e39c27

Browse files
authored
Fix error in non-home paths (#1129)
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 │ ) ╰──── ```
1 parent 6fe7713 commit 2e39c27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/prompt/panache-git.nu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export def current-dir [] {
2929
let current_dir = ($env.PWD)
3030

3131
let current_dir_relative_to_home = (
32-
do --ignore-errors { $current_dir | path relative-to $nu.home-path } | str join
32+
do --ignore-errors { $current_dir | path relative-to $nu.home-path | str join }
3333
)
3434

3535
let in_sub_dir_of_home = ($current_dir_relative_to_home | is-not-empty)

0 commit comments

Comments
 (0)