forked from kiss-community/kiss
kiss: Resolve path to root even if in subshell
This commit is contained in:
parent
64e77c91e5
commit
f552a75427
7
kiss
7
kiss
@ -1223,7 +1223,12 @@ pkg_updates() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
cd "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null ||:
|
# Go to the repository's root directory.
|
||||||
|
cd "$(git rev-parse --show-toplevel)"
|
||||||
|
|
||||||
|
# Go to the real root directory if this is a submodule.
|
||||||
|
git_root=$(git rev-parse --show-superproject-working-tree)
|
||||||
|
cd "${git_root:-"$PWD"}"
|
||||||
|
|
||||||
contains "$repos" "$PWD" || {
|
contains "$repos" "$PWD" || {
|
||||||
repos="$repos $PWD "
|
repos="$repos $PWD "
|
||||||
|
Loading…
Reference in New Issue
Block a user