Changing condition naming

This commit is contained in:
Alex Yatskov 2016-02-13 12:56:18 -08:00
parent 29f25892d8
commit eff8fa0abd

16
task.go
View File

@ -28,12 +28,12 @@ import (
) )
type task struct { type task struct {
Deps []string Deps []string
Links [][]string Links [][]string
Cmds [][]string Cmds [][]string
Envs [][]string Envs [][]string
IfTrue [][]string WTrue [][]string
IfFalse [][]string WFalse [][]string
} }
func (t *task) deps(conf *config) []string { func (t *task) deps(conf *config) []string {
@ -64,13 +64,13 @@ func (t *task) process(conf *config) error {
if conf.flags&flagNoCmds == 0 { if conf.flags&flagNoCmds == 0 {
CmdLoop: CmdLoop:
for { for {
for _, currCnd := range t.IfTrue { for _, currCnd := range t.WTrue {
if err := processCmd(currCnd, false, conf); err != nil { if err := processCmd(currCnd, false, conf); err != nil {
break CmdLoop break CmdLoop
} }
} }
for _, currCnd := range t.IfFalse { for _, currCnd := range t.WFalse {
if err := processCmd(currCnd, false, conf); err == nil { if err := processCmd(currCnd, false, conf); err == nil {
break CmdLoop break CmdLoop
} }