mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
fix: add asdf to list of banned commands (#1224)
Ban recusive asdf calls as they are inefficient and may introduce bugs. If you find yourself needing to invoke an `asdf` command from within asdf code, please source the appropriate file and invoke the corresponding function.
This commit is contained in:
parent
a9caa5bdff
commit
39909e01af
@ -13,7 +13,7 @@ asdf() {
|
||||
;;
|
||||
*)
|
||||
# forward other commands to asdf script
|
||||
command asdf "$command" "$@"
|
||||
command asdf "$command" "$@" # asdf_allow: ' asdf '
|
||||
;;
|
||||
|
||||
esac
|
||||
|
@ -97,7 +97,7 @@ write_shim_script() {
|
||||
cat <<EOF >"$shim_path"
|
||||
#!/usr/bin/env bash
|
||||
# asdf-plugin: ${plugin_name} ${version}
|
||||
exec $(asdf_dir)/bin/asdf exec "${executable_name}" "\$@"
|
||||
exec $(asdf_dir)/bin/asdf exec "${executable_name}" "\$@" # asdf_allow: ' asdf '
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
@ -41,6 +41,12 @@ banned_commands_regex=(
|
||||
# match certain filename patterns.
|
||||
# https://github-wiki-see.page/m/koalaman/shellcheck/wiki/SC2012
|
||||
'\bls '
|
||||
|
||||
# Ban recusive asdf calls as they are inefficient and may introduce bugs.
|
||||
# If you find yourself needing to invoke an `asdf` command from within
|
||||
# asdf code, please source the appropriate file and invoke the
|
||||
# corresponding function.
|
||||
'\basdf '
|
||||
)
|
||||
|
||||
setup() {
|
||||
|
Loading…
Reference in New Issue
Block a user