Skip to content

Commit a42df65

Browse files
committed
Put context in quotes
Signed-off-by: twobiers <[email protected]>
1 parent a15e0bb commit a42df65

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1.RunFunctionRequest)
139139
context = context[:80] + "..."
140140
}
141141

142-
newErr = fmt.Errorf("error converting YAML to JSON: yaml: line %d (document %d, line %d) near: %s: %s", yamlErr.AbsLine, docIndex+1, yamlErr.RelLine, context, yamlErr.Message)
142+
newErr = fmt.Errorf("error converting YAML to JSON: yaml: line %d (document %d, line %d) near: '%s': %s", yamlErr.AbsLine, docIndex+1, yamlErr.RelLine, context, yamlErr.Message)
143143
}
144144

145145
response.Fatal(rsp, errors.Wrap(newErr, "cannot decode manifest"))

fn_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ func TestRunFunction(t *testing.T) {
12261226
Results: []*fnv1.Result{
12271227
{
12281228
Severity: fnv1.Severity_SEVERITY_FATAL,
1229-
Message: "cannot decode manifest: error converting YAML to JSON: yaml: line 6 (document 1, line 4) near: name: %!@#$%^&*()_+: found character that cannot start any token",
1229+
Message: "cannot decode manifest: error converting YAML to JSON: yaml: line 6 (document 1, line 4) near: 'name: %!@#$%^&*()_+': found character that cannot start any token",
12301230
Target: fnv1.Target_TARGET_COMPOSITE.Enum(),
12311231
},
12321232
},

0 commit comments

Comments
 (0)