From c0557579da5f134793a94379bfb121be72ffc6d1 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 4 Mar 2015 00:35:02 -0800 Subject: [PATCH] command/unseal: forward error along --- command/unseal.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/command/unseal.go b/command/unseal.go index 57a378069b..110e7ae5e0 100644 --- a/command/unseal.go +++ b/command/unseal.go @@ -1,6 +1,7 @@ package command import ( + "fmt" "os" "strings" @@ -21,6 +22,13 @@ func (c *UnsealCommand) Run(args []string) int { value, err := password.Read(os.Stdin) if err != nil { + c.Ui.Error(fmt.Sprintf( + "Error attempting to ask for password. The raw error message\n"+ + "is shown below, but the most common reason for this error is\n"+ + "that you attempted to pipe a value into unseal. This is not\n"+ + "allowed. The value must be typed directly into the command\n"+ + "after it is executed.\n\n"+ + "Raw error: %s", err)) return 1 }