fix(agents-init): move argv assignments after guard in gitignore helper
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user