Skip to content

Commit

Permalink
feat: option BuildDir change MakeWrap working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
fcying committed Aug 31, 2024
1 parent fdcc273 commit a9a20da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/compiledb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/urfave/cli/v2"
)

var Version string = "v1.3.2"
var Version string = "v1.3.3"

func init() {
log.SetOutput(os.Stdout)
Expand Down
7 changes: 7 additions & 0 deletions internal/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ func WriteJSON(filename string, cmdCnt int, data *[]Command) {
func MakeWrap(args []string) {
var wg sync.WaitGroup

if ParseConfig.BuildDir != "" {
err := os.Chdir(ParseConfig.BuildDir)
if err != nil {
log.Error(err)
}
}

wg.Add(1)
go func() {
// append log
Expand Down

0 comments on commit a9a20da

Please sign in to comment.