mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
e4c7020a34
This commit changes the behavior of the function `newCommand` in `repl.go`. The input of this function is a string containing both a command to be run and its arguments. Prior to this commit, the function converted the entire input to lower case, without any distinction between the command and its arguments. This lead to the bug exposed in issue #5229. Both the lowercase command and all lower case arguments are put as fields in the `command` struct returned by the function. After this commit, the only part of the string that is converted to lower case is the command that is being executed, while the provided arguments are evaluated as provided to the function. The struct returned now contains the lower case command and the arguments as provided to the function. Fixes: #5229 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>