Skip to content

Commit

Permalink
fix edit bug (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
ieee0824 authored Sep 18, 2018
1 parent e1b29a1 commit fe06d46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions subcmd/vault/edit/v1/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package v1

import (
"encoding/json"
"os"

"github.com/aws/aws-sdk-go/aws/session"
"github.com/ieee0824/cryptex"
"github.com/ieee0824/cryptex/kms"
"github.com/jobtalk/pnzr/subcmd/vault/edit/util"
"os"
)

type Editor struct {
Expand Down Expand Up @@ -37,7 +38,7 @@ func (e *Editor) Edit(fileName string) error {
return err
}

w, err := os.OpenFile(fileName, os.O_WRONLY, 0644)
w, err := os.OpenFile(fileName, os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
return err
}
Expand Down

0 comments on commit fe06d46

Please sign in to comment.