Skip to content

Commit

Permalink
🐛 fix a bug in perl on mac (#767)
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <pgaikwad@redhat.com>
  • Loading branch information
pranavgaikwad authored Jan 30, 2025
1 parent 35bb8a3 commit 80e9439
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions provider/internal/builtin/service_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,7 @@ func runOSSpecificGrepCommand(pattern string, location string, providerContext p
escapedPattern = strings.ReplaceAll(escapedPattern, "'", "'\\''")
escapedPattern = strings.ReplaceAll(escapedPattern, "$", "\\$")
cmd := fmt.Sprintf(
`find %v -type f -print0 | \
xargs -0 perl -ne '/%v/ && print "$ARGV:$.:$1\n";'`,
`find %v -type f -exec perl -ne 'print "$ARGV:$.:$1\n" if /%v/; close ARGV if eof;' {} +`,
location, escapedPattern,
)
findstr := exec.Command("/bin/sh", "-c", cmd)
Expand Down

0 comments on commit 80e9439

Please sign in to comment.