mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
fix: ban the sort -V command (#755)
This commit is contained in:
parent
0de5f56b45
commit
aef4ae8b5a
@ -13,7 +13,9 @@ banned_commands=(
|
||||
# defined in POSIX
|
||||
column
|
||||
# does not work on alpine and should be grep -i either way
|
||||
"grep -y"
|
||||
"grep.* -y"
|
||||
# sort -V isn't supported everywhere
|
||||
"sort.*-V"
|
||||
)
|
||||
|
||||
setup() {
|
||||
@ -30,7 +32,7 @@ teardown() {
|
||||
# or expect an explicit comment at end of line, allowing it.
|
||||
run bash -c "grep -nHR '$cmd' lib bin | grep -v '# asdf_allow: $cmd'"
|
||||
echo "banned command $cmd: $output"
|
||||
[ "$status" -eq 1 ]
|
||||
[ "$status" -eq 1 ]
|
||||
[ "" == "$output" ]
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user