Skip to content

Commit

Permalink
feat(dump): print complete filedist path for dump (#2968)
Browse files Browse the repository at this point in the history
* choredump): print complete filedist path for dump

* Update cmd/db.go

Co-authored-by: Han Qiao <[email protected]>

---------

Co-authored-by: Han Qiao <[email protected]>
  • Loading branch information
avallete and sweatybridge authored Dec 11, 2024
1 parent c414ec8 commit e0d03ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"
"os/signal"
"path/filepath"

"github.com/spf13/afero"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -125,7 +126,11 @@ var (
},
PostRun: func(cmd *cobra.Command, args []string) {
if len(file) > 0 {
fmt.Fprintln(os.Stderr, "Dumped schema to "+utils.Bold(file)+".")
if absPath, err := filepath.Abs(file); err != nil {
fmt.Fprintln(os.Stderr, "Dumped schema to "+utils.Bold(file)+".")
} else {
fmt.Fprintln(os.Stderr, "Dumped schema to "+utils.Bold(absPath)+".")
}
}
},
}
Expand Down

0 comments on commit e0d03ec

Please sign in to comment.