Skip to content

Commit

Permalink
Ignore malformed manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
shilangyu committed Dec 28, 2023
1 parent 6a4e826 commit f14c727
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"log"
"os"
"path/filepath"
"sort"
Expand Down Expand Up @@ -140,8 +139,6 @@ func matchingManifests(path string, term string) (res []match) {
continue
}

const badManifestErrMsg = `Cannot parse "bin" attribute in a manifest. This should not happen. Please open an issue about it with steps to reproduce`

switch bin.Type() {
case fastjson.TypeString:
bins = append(bins, string(bin.GetStringBytes()))
Expand All @@ -157,12 +154,8 @@ func matchingManifests(path string, term string) (res []match) {
if len(stringArray) > 1 {
bins = append(bins, string(stringArray[1].GetStringBytes()))
}
default:
log.Fatalln(badManifestErrMsg)
}
}
default:
log.Fatalln(badManifestErrMsg)
}

for _, bin := range bins {
Expand Down

0 comments on commit f14c727

Please sign in to comment.