in astro/astro.go [140:163]
func (c *Project) Apply(parameters ApplyExecutionParameters) (<-chan string, <-chan *Result, error) {
logger.Trace.Println("astro: running Apply")
// Bind user vars
boundExecutions, err := c.executions(parameters.ExecutionParameters).bindAll(parameters.UserVars.Values)
if err != nil {
return nil, nil, err
}
// Get session
session, err := c.sessions.Current()
if err != nil {
return nil, nil, err
}
var applyFn func([]*boundExecution) (<-chan string, <-chan *Result, error)
if parameters.ModuleNames != nil {
applyFn = session.apply
} else {
applyFn = session.applyWithGraph
}
return applyFn(boundExecutions)
}