command/diff: output if no changes

This commit is contained in:
Mitchell Hashimoto 2014-06-19 14:58:30 -07:00
parent 1449d8a510
commit 74d75e87d6
1 changed files with 5 additions and 1 deletions

View File

@ -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
}