diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-17 00:54:53 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-17 00:54:53 -0800 |
commit | 024dcc13733c55722cbd65a5fd9c42d63664f889 (patch) | |
tree | 7de5042cb207c6c0cd00fa18e19470fb33e0e597 /cmd/ponzu/options.go | |
parent | b564e0ce57730af0afa9fa43b26aaf4d49539c86 (diff) |
add debug for build step
Diffstat (limited to 'cmd/ponzu/options.go')
-rw-r--r-- | cmd/ponzu/options.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go index 142302f..dc2a573 100644 --- a/cmd/ponzu/options.go +++ b/cmd/ponzu/options.go @@ -178,17 +178,22 @@ type copyPlan struct { func copyFile(info os.FileInfo, src string, dst string) error { dstFile, err := os.Create(filepath.Join(dst, info.Name())) + defer dstFile.Close() if err != nil { + fmt.Println("Error in os.Create", src, dst) return err } srcFile, err := os.Open(filepath.Join(src, info.Name())) + defer srcFile.Close() if err != nil { + fmt.Println("Error in os.Open", src, dst) return err } _, err = io.Copy(dstFile, srcFile) if err != nil { + fmt.Println("Error in io.Copy", src, dst) return err } @@ -205,7 +210,7 @@ func copyDirWithPlan(plan copyPlan) error { path := plan.srcPath if plan.ignoreRootDir { dirs := strings.Split(plan.srcPath, string(filepath.Separator))[1:] - filepath.Join(dirs...) + path = filepath.Join(dirs...) } dirPath := filepath.Join(path, info.Name()) |