From aa70f41f4d12a16fe17de69583affc319cdd0bbb Mon Sep 17 00:00:00 2001 From: "a.i.kuleshov" Date: Sun, 28 Apr 2024 19:16:37 +0300 Subject: [PATCH] feat: add basepath --- internal/cli/build.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cli/build.go b/internal/cli/build.go index af15e69c..56d4f740 100644 --- a/internal/cli/build.go +++ b/internal/cli/build.go @@ -98,7 +98,7 @@ func newAnswerBuilder(buildDir, outputPath string, plugins []string, originalAns material := &buildingMaterial{originalAnswerInfo: originalAnswerInfo} parentDir, _ := filepath.Abs(".") if buildDir != "" { - material.tmpDir = buildDir + material.tmpDir = filepath.Join(parentDir, buildDir) } else { material.tmpDir, _ = os.MkdirTemp(parentDir, "answer_build") } @@ -148,7 +148,7 @@ func formatPlugins(plugins []string) (formatted []*pluginInfo) { // createMainGoFile creates main.go file in tmp dir that content is mainGoTpl func createMainGoFile(b *buildingMaterial) (err error) { - fmt.Printf("[build] tmp dir: %s\n", b.tmpDir) + fmt.Printf("[build] build dir: %s\n", b.tmpDir) err = dir.CreateDirIfNotExist(b.tmpDir) if err != nil { return err