Created
June 24, 2016 14:43
-
-
Save BrianHicks/59869277e540fdc5a257330ac93f6de2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ensure that all of a resources dependencies have already run successfully | |
func checkDeps(graph *Graph, id string, results []*ApplyResult) (failed []string) { | |
for _, dep := range graph.Depends(id) { // not a huge fan of that name but it's consistent. | |
for _, result := range results { | |
if result.Path == dep && !result.Success { | |
failed = append(failed, result.Path) | |
} | |
} | |
} | |
return failed | |
} | |
// note: this probably could be done inline in Apply. Similar logic should be added to Check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment