From 74d75e87d6711a012b0731af5e8daff40d268613 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 19 Jun 2014 14:58:30 -0700 Subject: [PATCH] command/diff: output if no changes --- command/diff.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/diff.go b/command/diff.go index 48a1e82ee..e7da81df8 100644 --- a/command/diff.go +++ b/command/diff.go @@ -75,7 +75,11 @@ func (c *DiffCommand) Run(args []string) int { return 1 } - c.Ui.Output(strings.TrimSpace(diff.String())) + if diff.Empty() { + c.Ui.Output("No changes. Infrastructure is up-to-date.") + } else { + c.Ui.Output(strings.TrimSpace(diff.String())) + } return 0 }