Skip to content

Commit

Permalink
prevent panic on loadImports when imported package isn't reachable
Browse files Browse the repository at this point in the history
  • Loading branch information
sduchesneau committed Mar 18, 2024
1 parent 9049f11 commit c7dfc88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion manifest/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,11 @@ func loadImports(pkg *pbsubstreams.Package, manif *Manifest) error {
importName := kv[0]
importPath := manif.resolvePath(kv[1])

subpkgReader := MustNewReader(importPath)
subpkgReader, err := NewReader(importPath)
if err != nil {
return fmt.Errorf("importing %q: %w", importPath, err)
}

subpkg, _, err := subpkgReader.Read()
if err != nil {
return fmt.Errorf("importing %q: %w", importPath, err)
Expand Down

0 comments on commit c7dfc88

Please sign in to comment.