MCPcopy Index your code
hub / github.com/coder/coder / checkMinVersion

Method checkMinVersion

provisioner/terraform/executor.go:164–176  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

162}
163
164func (e *executor) checkMinVersion(ctx context.Context) error {
165 v, err := e.version(ctx)
166 if err != nil {
167 return err
168 }
169 if !v.GreaterThanOrEqual(minTerraformVersion) {
170 return xerrors.Errorf(
171 "terraform version %q is too old. required >= %q",
172 v.String(),
173 minTerraformVersion.String())
174 }
175 return nil
176}
177
178// version doesn't need the lock because it doesn't read or write to any state.
179func (e *executor) version(ctx context.Context) (*version.Version, error) {

Callers 4

InitMethod · 0.80
PlanMethod · 0.80
GraphMethod · 0.80
ApplyMethod · 0.80

Calls 3

versionMethod · 0.95
ErrorfMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected