make environment variable interpolation preprocessor optional (#1715)
This commit is contained in:
		| @@ -21,9 +21,14 @@ type jsonValue struct { | ||||
| 	*simple.Json | ||||
| } | ||||
|  | ||||
| func newValues(ch *source.ChangeSet) (reader.Values, error) { | ||||
| func newValues(ch *source.ChangeSet, opts reader.Options) (reader.Values, error) { | ||||
| 	sj := simple.New() | ||||
| 	data, _ := reader.ReplaceEnvVars(ch.Data) | ||||
| 	data := ch.Data | ||||
|  | ||||
| 	if !opts.DisableReplaceEnvVars { | ||||
| 		data, _ = reader.ReplaceEnvVars(ch.Data) | ||||
| 	} | ||||
|  | ||||
| 	if err := sj.UnmarshalJSON(data); err != nil { | ||||
| 		sj.SetPath(nil, string(ch.Data)) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user