Skip to content

Commit 4c2d1c2

Browse files
committed
Don't use subshells in if statement
1 parent a666074 commit 4c2d1c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/bash-commons/src/file.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function file_replace_or_append_text {
5757
local readonly replacement_text="$2"
5858
local readonly file="$3"
5959

60-
if $(file_exists "$file") && $(file_contains_text "$original_text_regex" "$file"); then
60+
if file_exists "$file" && file_contains_text "$original_text_regex" "$file"; then
6161
file_replace_text "$original_text_regex" "$replacement_text" "$file"
6262
else
6363
file_append_text "$replacement_text" "$file"

0 commit comments

Comments
 (0)