From 5afd1336e860992c6d440264ae1067c06126f9db Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 24 Mar 2019 10:46:42 +0100 Subject: [PATCH] functions/fish_npm_helper: Use physical pwd This searched for package.json in any parent, so just like finding .git and .hg directories it _needs_ to use the physical pwd because that's what git/hg/yarn use. In general, if you do _any_ logic on $PWD, it should be the physical path. Logical $PWD is basically only good for display and cd-ing around with symlinks. [ci skip] --- share/functions/fish_npm_helper.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/fish_npm_helper.fish b/share/functions/fish_npm_helper.fish index 3ba7872b9..810154c01 100644 --- a/share/functions/fish_npm_helper.fish +++ b/share/functions/fish_npm_helper.fish @@ -38,7 +38,7 @@ function __yarn_filtered_list_packages end function __yarn_find_package_json - set parents (__fish_parent_directories (pwd)) + set parents (__fish_parent_directories (pwd -P)) for p in $parents if test -f "$p/package.json"