Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/catalog/loader/filter/tag_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ func New(config *Config) (*TagFilter, error) {
if _, ok := filter.allowedTags[val]; !ok {
filter.allowedTags[val] = struct{}{}
}
delete(filter.block, val)
// Note: only tags specified in IncludeTags should be removed from the block list
// not normal tags like config.Tags
}
}
for _, tag := range config.IncludeTags {
Expand Down
2 changes: 1 addition & 1 deletion pkg/catalog/loader/filter/tag_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestTagBasedFilter(t *testing.T) {
})
t.Run("match-includes", func(t *testing.T) {
filter, err := New(&Config{
Tags: []string{"fuzz"},
IncludeTags: []string{"fuzz"},
ExcludeTags: []string{"fuzz"},
})
require.Nil(t, err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/output/format_screen.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (w *StandardWriter) formatScreen(output *ResultEvent) []byte {
for i, item := range output.ExtractedResults {
// trim trailing space
item = strings.TrimSpace(item)
item = strconv.QuoteToASCII(item)
item = strings.ReplaceAll(item, "\n", "\\n") // only replace newlines
builder.WriteString(w.aurora.BrightCyan(item).String())

if i != len(output.ExtractedResults)-1 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/protocols/code/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func interpretEnvVars(source string, vars map[string]interface{}) string {
// bash mode
if strings.Contains(source, "$") {
for k, v := range vars {
source = strings.ReplaceAll(source, "$"+k, fmt.Sprintf("'%s'", v))
source = strings.ReplaceAll(source, "$"+k, fmt.Sprintf("%s", v))
}
}
// python mode
Expand Down