small cleanup of run command error msg

This commit is contained in:
Alex Dadgar 2016-07-21 09:52:41 -07:00
parent 75768770aa
commit ed919f4d87
1 changed files with 2 additions and 1 deletions

View File

@ -127,6 +127,7 @@ func (c *RunCommand) Run(args []string) int {
} else {
f = os.Stdin
}
path = "stdin"
default:
file, err := os.Open(path)
defer file.Close()
@ -140,7 +141,7 @@ func (c *RunCommand) Run(args []string) int {
// Parse the JobFile
job, err := jobspec.Parse(f)
if err != nil {
c.Ui.Error(fmt.Sprintf("Error parsing job file %s: %v", path, err))
c.Ui.Error(fmt.Sprintf("Error parsing job file from %s: %v", path, err))
return 1
}