-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Running nix fmt
(set up as recommended in the README) fails with
Error: failed to load config: failed to determine tree root: failed to find tree-root based on tree-root-file: could not find [.git/config] in /path/to/your/worktree
To Reproduce
Steps to reproduce the behavior:
- Create a git worktree using
git worktree add
- Try to run
nix fmt
in the worktree.
Expected behavior
Formats as normal.
System information
treefmt-nix version: a05be41
nixpkgs version: 56b033fe4f9da755b1872466f24b32df7cfc229e
nix-shell -p nix-info --run "nix-info -m"
:
- system: `"aarch64-linux"`
- host os: `Linux 6.16.0-rc3, NixOS, 25.11 (Xantusia), 25.11.20250615.cbfb263`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Lix, like Nix) 2.91.1
System type: aarch64-linux
Additional system types:
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/user/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/user/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/user/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/user/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/g9clkwljsncp6fadzc105ay78b7l6mg2-lix-2.91.1/share`
- nixpkgs: `/nix/store/nki040zkkasz5mnd7c6jv0gn3sipmc30-source`
flaviut
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working