mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2025-08-14 13:01:06 +00:00
fix: skip invalid lines (#160)
This commit is contained in:
parent
cbdbab28e6
commit
9a146f43d1
|
@ -52,6 +52,10 @@ func getNonVirtualPackage(executor exec.Executor, name string) (pkg *AptPackage,
|
|||
func getPackage(executor exec.Executor, paragraph string) (pkg *AptPackage, err error) {
|
||||
errMsgs := []string{}
|
||||
for _, splitLine := range GetSplitLines(paragraph, ":", 2) {
|
||||
if len(splitLine.Words) < 2 {
|
||||
logging.Debug("Skipping invalid line: %+v\n", splitLine.Line)
|
||||
continue
|
||||
}
|
||||
switch splitLine.Words[0] {
|
||||
case "Package":
|
||||
// Initialize since this will provide the first struct value if present.
|
||||
|
|
Loading…
Reference in a new issue