Harden Go CLI subprocess behavior
This commit is contained in:
@@ -14,9 +14,9 @@ func ReadRequiredFile(path string, label string) ([]byte, error) {
|
||||
return contents, nil
|
||||
}
|
||||
|
||||
func ValidateWellFormedJSON(raw []byte) error {
|
||||
func ValidateWellFormedJSON(path string, raw []byte) error {
|
||||
if !json.Valid(raw) {
|
||||
return fmt.Errorf("transcript file is not valid JSON")
|
||||
return fmt.Errorf("transcript file %q is not valid JSON", path)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user