From 6972a33c4f5ffe00ee869e224f5dc100935f1515 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 4 May 2017 06:40:11 -0400 Subject: [PATCH] Write always needs a path, even with force. Fixes #2674 --- command/write.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command/write.go b/command/write.go index 0614f9b1986a..21478f9f00f5 100644 --- a/command/write.go +++ b/command/write.go @@ -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()