Stop panic when vault ssh username fetching fails

This commit is contained in:
Wesley Merkel
2015-12-26 15:09:07 -07:00
parent e6fd8cc418
commit 59c5ccb36f

View File

@@ -69,6 +69,7 @@ func (c *SSHCommand) Run(args []string) int {
u, err := user.Current()
if err != nil {
c.Ui.Error(fmt.Sprintf("Error fetching username: %s", err))
return 1
}
username = u.Username
ipAddr = input[0]