Skip to content

Commit

Permalink
fix: Use utils.WriteFile to prevent missing dir when saving migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Feb 29, 2024
1 parent 756a0b2 commit c0e6d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/db/pull/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func diffRemoteSchema(p utils.Program, ctx context.Context, schema []string, pat
if len(output) == 0 {
return errors.New(errInSync)
}
if err := afero.WriteFile(fsys, path, []byte(output), 0644); err != nil {
if err := utils.WriteFile(path, []byte(output), fsys); err != nil {
return errors.Errorf("failed to write dump file: %w", err)
}
return nil
Expand Down

0 comments on commit c0e6d53

Please sign in to comment.