Skip to content

Commit f37422d

Browse files
author
Jorengarenar
committed
Replace 'eval' with 'sh -c'
1 parent a35493f commit f37422d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git-autofmt-diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,13 @@ process_file () (
350350
warn "couldn't retrieve ${obj2:+$obj2:}$cur_name"
351351
fi
352352

353-
{ eval "$formatter"; } < "$cur" > "$cur_fmt" 2> /dev/null
353+
sh -c "$formatter" < "$cur" > "$cur_fmt" 2> /dev/null
354354

355355
if git diff -s "$cur" "$cur_fmt"; then
356356
return
357357
fi
358358

359-
{ eval "$formatter"; } < "$old" > "$old_fmt" 2> /dev/null
359+
sh -c "$formatter" < "$old" > "$old_fmt" 2> /dev/null
360360

361361
git_changes_formatted "$tempdir" "$cur" "$old" "$cur_fmt" "$old_fmt" > "$fmt"
362362

@@ -457,7 +457,7 @@ main () (
457457
process_file "$obj1" "$obj2" "$line" >> "$outfile"
458458
done
459459

460-
{ eval "$(git_conf_get pager)"; } < "$outfile"
460+
sh -c "$(git_conf_get pager)" < "$outfile"
461461

462462
rm "$outfile"
463463
)

0 commit comments

Comments
 (0)