Skip to content

Commit

Permalink
fix(build): more detailed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-psi committed May 20, 2022
1 parent ec66621 commit f38d5e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func BuildSource(zipFiles []string, output string) error {
if f.Name == "Payload/source.json" {
rc, err := f.Open()
if err != nil {
color.Red("error: couldn't read source info for %s", zipFile)
color.Red("error: couldn't read source info for %s: %s", zipFile, err)
os.Remove(fmt.Sprintf("%s/icons/%s.png", output, filepath.Base(zipFile)))
return
}
Expand All @@ -89,7 +89,7 @@ func BuildSource(zipFiles []string, output string) error {

raw, err := parser.Parse(buf.String())
if err != nil {
color.Red("error: source.json is malformed for %s", zipFile)
color.Red("error: source.json is malformed for %s: %s", zipFile, err)
os.Remove(fmt.Sprintf("%s/icons/%s.png", output, filepath.Base(zipFile)))
return
}
Expand Down Expand Up @@ -125,7 +125,7 @@ func BuildSource(zipFiles []string, output string) error {
}
img, err := os.Create(fmt.Sprintf("%s/icons/%s.png", output, filepath.Base(zipFile)))
if err != nil {
color.Red("error: Couldn't create temporary icon file %s/icons/%s.png", output, filepath.Base(zipFile))
color.Red("error: Couldn't create temporary icon file %s/icons/%s.png: %s", output, filepath.Base(zipFile), err)
hasIcon = false
return
}
Expand Down

0 comments on commit f38d5e1

Please sign in to comment.