mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-23 19:14:34 +02:00
IMP(shellcheck): disable sed replacement (SC2001)
Shellcheck recommands to replace sed by shell expansions in 'simple' cases. However, the replacement here is likely to lead to erros, so we disable this rule. Moreover, it does'nt really add readability.
This commit is contained in:
@ -27,6 +27,7 @@ audit() {
|
||||
debug "echo \"$EXCEPTIONS\" | grep -q $dir"
|
||||
if echo "$EXCEPTIONS" | grep -q "$dir"; then
|
||||
debug "$dir is confirmed as an exception"
|
||||
# shellcheck disable=SC2001
|
||||
RESULT=$(sed "s!$dir!!" <<<"$RESULT")
|
||||
else
|
||||
debug "$dir not found in exceptions"
|
||||
@ -66,6 +67,7 @@ apply() {
|
||||
debug "echo \"$EXCEPTIONS\" | grep -q $dir"
|
||||
if echo "$EXCEPTIONS" | grep -q "$dir"; then
|
||||
debug "$dir is confirmed as an exception"
|
||||
# shellcheck disable=SC2001
|
||||
RESULT=$(sed "s!$dir!!" <<<"$RESULT")
|
||||
else
|
||||
debug "$dir not found in exceptions"
|
||||
|
Reference in New Issue
Block a user