Skip to content

Commit

Permalink
👻 debug
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed Jan 15, 2025
1 parent 6a0829d commit f0d4bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions provider/internal/builtin/service_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,9 @@ func runOSSpecificGrepCommand(pattern string, location string, providerContext p
$excluded_paths = $env.EXCLUDEDPATHS -split ','
`
}
findstr := exec.Command(utilName, "-Command",
fmt.Sprintf(psScript, exclusionEnvVar, exclusionScript))
psScript = fmt.Sprintf(psScript, exclusionEnvVar, exclusionScript)
findstr := exec.Command(utilName, "-Command", psScript)
log.Info("running ps script with excluded patterns", "patterns", excludePatterns)
findstr.Env = append(os.Environ(),
"PATTERN="+pattern,
"FILEPATHS="+strings.Join(locations, ","),
Expand Down
2 changes: 1 addition & 1 deletion provider/internal/builtin/service_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func Test_builtinServiceClient_Evaluate_InclusionExclusion(t *testing.T) {
config: provider.InitConfig{
Location: baseLocation,
},
log: testr.New(t),
log: testr.NewWithOptions(t, testr.Options{Verbosity: 20}),
includedPaths: tt.includedPathsFromConfig,
locationCache: map[string]float64{},
cacheMutex: sync.RWMutex{},
Expand Down

0 comments on commit f0d4bd9

Please sign in to comment.