diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b8f605..6979961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- `.#checks.nixfmt` can be run from everywhere when nixFiles are relative to project. + ## [10.0.0] - 2024-02-06 ### Added diff --git a/ci/nixfmt b/ci/nixfmt index 70490a2..f6f28bc 100644 --- a/ci/nixfmt +++ b/ci/nixfmt @@ -13,6 +13,8 @@ if [[ $* =~ (^|[[:space:]])+--fix([[:space:]]|$)+ ]]; then check="" fi +cd "$(git rev-parse --show-toplevel)" + if [ $# -eq 0 ] || [ -z "$check" ]; then exitCode=0 files=()