Skip to content
Open
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
8 changes: 7 additions & 1 deletion syft/pkg/cataloger/swift/parse_podfile_lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@ func parsePodfileLock(_ context.Context, _ file.Resolver, _ *generic.Environment
return nil, nil, fmt.Errorf("malformed podfile.lock")
}
splits := strings.Split(podBlob, " ")
if len(splits) < 1 {
continue
}
podName := splits[0]
podVersion := strings.TrimSuffix(strings.TrimPrefix(splits[1], "("), ")")
var podVersion string
if len(splits) > 1 {
podVersion = strings.TrimSuffix(strings.TrimPrefix(splits[1], "("), ")")
}
podRootPkg := strings.Split(podName, "/")[0]

var pkgHash string
Expand Down
Loading