Skip to content

Commit

Permalink
Merge pull request #2 from anytimesoon/fix-finding-execs
Browse files Browse the repository at this point in the history
Fix finding execs and exit if backup fails
  • Loading branch information
anytimesoon authored Apr 8, 2024
2 parents c312c8f + 6bd6970 commit 68e30a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func backup() string {
if dumpExec.Error != nil {
log.Println("Failed to dump")
log.Println(dumpExec.Error.Err)
log.Println(dumpExec.Output)
log.Fatalln(dumpExec.Output)

} else {
log.Println(dumpExec.Output)
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ func findExecutables() {
err := filepath.WalkDir(viper.GetString("directories.executables"), func(path string, d fs.DirEntry, err error) error {
switch d.Name() {
case "pg_dump":
pathToDump = filepath.Join(viper.GetString("directories.executables"), path)
pathToDump = path
case "pg_restore":
pathToRestore = filepath.Join(viper.GetString("directories.executables"), path)
pathToRestore = path
default:

}
Expand Down

0 comments on commit 68e30a8

Please sign in to comment.