From 283881ed4e231e309e8ddc4c03b7f26aa0432fb8 Mon Sep 17 00:00:00 2001 From: Marko Vejnovic Date: Thu, 1 Oct 2026 21:55:33 -0700 Subject: [PATCH] fix(vendor): find the repository root from the script's location `git rev-parse --show-toplevel` names the outermost repository, so with atuin checked out as a subdirectory of another one, `list` and `update` looked for vendor/.repositories.json in the wrong place. --- vendor/vendor.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vendor/vendor.sh b/vendor/vendor.sh index 57277c53e..bc1355f7f 100755 --- a/vendor/vendor.sh +++ b/vendor/vendor.sh @@ -5,7 +5,9 @@ # shellcheck disable=SC2016 # `$n` is a jq variable set -euf -root_dir=$(command git rev-parse --show-toplevel) +# Not `git rev-parse --show-toplevel`: when this repository is a subdirectory of +# another one, that's the outer repository's root. +root_dir=$(cd -- "$(dirname -- "$0")/.." && pwd) vendor_dir=vendor db_path=$vendor_dir/.repositories.json script_name=$(basename "$0")