Merge pull request #1447 from nak3/fix-error-nomad-run
Fix nomad run parse error
This commit is contained in:
commit
3bacec6c40
|
@ -109,7 +109,7 @@ func (c *RunCommand) Run(args []string) int {
|
||||||
length = fullId
|
length = fullId
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that we got exactly one node
|
// Check that we got exactly one argument
|
||||||
args = flags.Args()
|
args = flags.Args()
|
||||||
if len(args) != 1 {
|
if len(args) != 1 {
|
||||||
c.Ui.Error(c.Help())
|
c.Ui.Error(c.Help())
|
||||||
|
@ -140,7 +140,7 @@ func (c *RunCommand) Run(args []string) int {
|
||||||
// Parse the JobFile
|
// Parse the JobFile
|
||||||
job, err := jobspec.Parse(f)
|
job, err := jobspec.Parse(f)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Ui.Error(fmt.Sprintf("Error parsing job file %s: %v", f, err))
|
c.Ui.Error(fmt.Sprintf("Error parsing job file %s: %v", path, err))
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue