Skip to content

Commit 45c458b

Browse files
committed
enhanced error message for bad PDSC files
1 parent 1dd5d14 commit 45c458b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cmd/installer/root.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,7 @@ func InitializeCache() error {
572572
}
573573
pdscXML := xml.NewPdscXML(pdscFilePath)
574574
if err := pdscXML.Read(); err != nil {
575-
log.Errorf("Could not retrieve pack's PDSC file from %q", pdscFilePath)
576-
return errs.ErrUnknownBehavior
575+
return fmt.Errorf("%q: %w", pdscFilePath, err)
577576
}
578577
releaseTag := pdscXML.FindReleaseTagByVersion("")
579578
cacheTag := xml.PdscTag{
@@ -2117,8 +2116,7 @@ func (p *PacksInstallationType) downloadPdscFile(pdscTag xml.PdscTag, skipInstal
21172116

21182117
pdscXML := xml.NewPdscXML(pdscFilePath)
21192118
if err := pdscXML.Read(); err != nil {
2120-
log.Errorf("Could not retrieve pack's PDSC file from %q", pdscFilePath)
2121-
return errs.ErrUnknownBehavior
2119+
return fmt.Errorf("%q: %w", pdscFilePath, err)
21222120
}
21232121
releaseTag := pdscXML.FindReleaseTagByVersion("")
21242122
cacheTag := xml.PdscTag{

0 commit comments

Comments
 (0)