Add logging.

This commit is contained in:
jregan
2020-05-22 18:54:17 -07:00
parent 5b1edcdd0e
commit 02184dbfc5
2 changed files with 7 additions and 3 deletions

View File

@@ -96,10 +96,12 @@ func (b *Compiler) Compile() error {
err, "cannot compile %s:\nSTDERR\n%s\n",
b.srcPath(), b.stderr.String())
}
if result := filepath.Join(b.workDir, b.objFile()); !utils.FileExists(result) {
return fmt.Errorf("post compile, cannot find '%s'", result)
result := filepath.Join(b.workDir, b.objFile())
if utils.FileExists(result) {
log.Printf("Created %s", result)
return nil
}
return nil
return fmt.Errorf("post compile, cannot find '%s'", result)
}
func (b *Compiler) report() {