Exec variable should use pre-existing error variable

Small fixup
This commit is contained in:
James Shubin
2016-03-03 19:41:50 -05:00
parent 10b8c93da4
commit 267d5179f5

View File

@@ -228,7 +228,7 @@ func (obj *ExecRes) CheckApply(apply bool) (stateok bool, err error) {
cmdName = obj.IfShell // usually bash, or sh
cmdArgs = []string{"-c", obj.IfCmd}
}
err := exec.Command(cmdName, cmdArgs...).Run()
err = exec.Command(cmdName, cmdArgs...).Run()
if err != nil {
// TODO: check exit value
return true, nil // don't run