From 8147790da9305b1f216286018f7af865f179aa5a Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sun, 30 Nov 2025 17:55:22 +0000 Subject: [PATCH] ci/update: always cd to the root of the flake Allows running the script from a sub-directory, e.g. cd ci nix-build -A update result/bin/update --- ci/update.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/update.nix b/ci/update.nix index 33c5c887..e1f56aa4 100644 --- a/ci/update.nix +++ b/ci/update.nix @@ -31,6 +31,9 @@ writeShellApplication { update_args+=( "--commit-lock-file" ) fi + # Ensure we run at the root of the flake + cd "$(git rev-parse --show-toplevel)" + currentCommit() { git show --no-patch --format=%h }