Skip to content

Commit

Permalink
Fix using REPL AVAIL/REPL AVAIL IN as custom columns (#515)
Browse files Browse the repository at this point in the history
These two were not included in `possibleColumns` and therefore
running e.g. `pluto detect-files -o markdown --columns "REPL AVAIL"`
would not actually print the column, despite no error being
reported.

Co-authored-by: Andy Suderman <andy@fairwinds.com>
  • Loading branch information
valorl and sudermanjr authored Dec 18, 2023
1 parent 37f1ee1 commit 95acae7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/api/columns.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ var possibleColumns = []column{
new(removedIn),
new(component),
new(filepath),
new(replacementAvailable),
new(replacementAvailableIn),
}

// name is the output name
Expand Down Expand Up @@ -181,7 +183,7 @@ func (instance *Instance) wideColumns() columnList {

// customColumns returns a custom list of columns based on names
func (instance *Instance) customColumns() columnList {
var outputColumns = make(map[int]column)
outputColumns := make(map[int]column)
for i, d := range instance.CustomColumns {
for _, c := range possibleColumns {
if d == c.header() {
Expand Down

0 comments on commit 95acae7

Please sign in to comment.