fix(agents-init): move argv assignments after guard in gitignore helper

This commit is contained in:
2026-06-12 21:41:14 -04:00
parent b6ed77d8f9
commit e6de825fb1
+3 -3
View File
@@ -21,9 +21,6 @@
# EXAMPLE
# _agents_init_ensure_gitignore /home/user/myproject "AGENTS/"
function _agents_init_ensure_gitignore
set -l root $argv[1]
set -l pattern $argv[2]
set -l c_ok (set_color green)
set -l c_reset (set_color normal)
@@ -32,6 +29,9 @@ function _agents_init_ensure_gitignore
return 1
end
set -l root $argv[1]
set -l pattern $argv[2]
set -l gitignore "$root/.gitignore"
# Prefer git check-ignore (respects wildcards, parent globs, negations).