dump flag --target should be allowed to write existing file
Signed-off-by: lou <alex1988@outlook.com>
This commit is contained in:
parent
6a2b10e2a8
commit
80db02fc35
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ func runDump(ctx context.Context, opts DumpOptions, gopts GlobalOptions, args []
|
|||
canWriteArchiveFunc := checkStdoutArchive
|
||||
|
||||
if opts.Target != "" {
|
||||
file, err := os.OpenFile(opts.Target, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0o666)
|
||||
file, err := os.Create(opts.Target)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot dump to file: %w", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue