fix(agents-init): move argv assignments after guard in gitignore helper
This commit is contained in:
@@ -21,9 +21,6 @@
|
|||||||
# EXAMPLE
|
# EXAMPLE
|
||||||
# _agents_init_ensure_gitignore /home/user/myproject "AGENTS/"
|
# _agents_init_ensure_gitignore /home/user/myproject "AGENTS/"
|
||||||
function _agents_init_ensure_gitignore
|
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_ok (set_color green)
|
||||||
set -l c_reset (set_color normal)
|
set -l c_reset (set_color normal)
|
||||||
|
|
||||||
@@ -32,6 +29,9 @@ function _agents_init_ensure_gitignore
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
set -l root $argv[1]
|
||||||
|
set -l pattern $argv[2]
|
||||||
|
|
||||||
set -l gitignore "$root/.gitignore"
|
set -l gitignore "$root/.gitignore"
|
||||||
|
|
||||||
# Prefer git check-ignore (respects wildcards, parent globs, negations).
|
# Prefer git check-ignore (respects wildcards, parent globs, negations).
|
||||||
|
|||||||
Reference in New Issue
Block a user