Skip to content

Commit ed766d0

Browse files
committed
add more error context
1 parent db24679 commit ed766d0

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

types/convert.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
package types
22

33
import (
4-
"fmt"
5-
64
"github.com/aquasecurity/trivy/pkg/iac/terraform"
5+
hcty "github.com/hashicorp/go-cty/cty"
76
"github.com/hashicorp/hcl/v2"
87
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
9-
"github.com/zclconf/go-cty/cty"
10-
hcty "github.com/hashicorp/go-cty/cty"
11-
hctyjson "github.com/hashicorp/go-cty/cty/json"
12-
ctyjson "github.com/zclconf/go-cty/cty/json"
138

149
"github.com/coder/terraform-provider-coder/v2/provider"
1510
)

types/parameter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (r *ParameterData) Valid() hcl.Diagnostics {
113113
if diag.HasError() {
114114
// TODO: We can take the attr path and decorate the error with
115115
// source information.
116-
return hclDiagnostics(diag, source)
116+
return hclDiagnostics(diag, r.Source)
117117
}
118118
return nil
119119
}

0 commit comments

Comments
 (0)