getMissingRequiredVars returns required vars that are not set in the task's vars.
(t *ast.Task)
| 148 | |
| 149 | // getMissingRequiredVars returns required vars that are not set in the task's vars. |
| 150 | func getMissingRequiredVars(t *ast.Task) []*ast.VarsWithValidation { |
| 151 | if t.Requires == nil { |
| 152 | return nil |
| 153 | } |
| 154 | var missing []*ast.VarsWithValidation |
| 155 | for _, v := range t.Requires.Vars { |
| 156 | if _, ok := t.Vars.Get(v.Name); !ok { |
| 157 | missing = append(missing, v) |
| 158 | } |
| 159 | } |
| 160 | return missing |
| 161 | } |
| 162 | |
| 163 | func (e *Executor) areTaskRequiredVarsSet(t *ast.Task) error { |
| 164 | missing := getMissingRequiredVars(t) |
no test coverage detected
searching dependent graphs…