From aef4ae8b5abced2225ea0359b643cf9901558074 Mon Sep 17 00:00:00 2001 From: Trevor Brown Date: Wed, 8 Jul 2020 01:37:52 -0400 Subject: [PATCH] fix: ban the sort -V command (#755) --- test/banned_commands.bats | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/banned_commands.bats b/test/banned_commands.bats index 7087e634..ae06865c 100644 --- a/test/banned_commands.bats +++ b/test/banned_commands.bats @@ -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 }