Skip to content

Commit

Permalink
builder: Print non-existent source files names in error message
Browse files Browse the repository at this point in the history
Now error message specifies which source file could not be found
while building a project.
  • Loading branch information
m-gorecki authored and sjanc committed Apr 13, 2023
1 parent c7b9664 commit ece4b3c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions newt/builder/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ func (b *Builder) collectCompileEntriesBpkg(bpkg *BuildPackage) (
}

for _, filename := range bpkg.SourceFiles {
var dir string
repo, path, err := newtutil.ParsePackageString(filename)

if err != nil {
Expand All @@ -379,8 +378,8 @@ func (b *Builder) collectCompileEntriesBpkg(bpkg *BuildPackage) (

if util.NodeNotExist(filename) {
return nil, util.NewNewtError(fmt.Sprintf(
"Specified source directory %s, does not exist.",
dir))
"Specified source file %s, does not exist.",
filename))
}

entry, err := c.CollectSingleEntry(filename)
Expand Down

0 comments on commit ece4b3c

Please sign in to comment.