Skip to content

Commit

Permalink
Write always needs a path, even with force.
Browse files Browse the repository at this point in the history
Fixes #2674
  • Loading branch information
jefferai committed May 4, 2017
1 parent ee2dd47 commit 6972a33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions command/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ func (c *WriteCommand) Run(args []string) int {
}

args = flags.Args()
if len(args) < 1 {
c.Ui.Error("write requires a path")
flags.Usage()
return 1
}

if len(args) < 2 && !force {
c.Ui.Error("write expects at least two arguments; use -f to perform the write anyways")
flags.Usage()
Expand Down

0 comments on commit 6972a33

Please sign in to comment.