opa
opa copied to clipboard
OPA exec with bundle does not work on windows
Short description
Getting error on OPA exec when running command on windows that works on linux/mac.
OPA version: 0.40.0
Steps To Reproduce
- Run below command
opa_windows_amd64.exe exec --format=pretty --bundle ../test/rego/ path_to_json_folder
The error we get on windows
{"err":"runtime error: invalid URL for bundle \"~0\": parse \"file://C:\\\\repos\\\\test\\\\rego\": invalid port \":\\\\repos\\\\test\\\\rego\" after host","level":"error","msg":"Unexpected error.","time":"2022-09-14T11:06:43+10:00"}
Issues seems to be that it doesn't like the second : and treating it as port. the double escaping also doesn't help.
Expected behavior
It should report on the results and not error out.
Additional context
Working on linux/mac without issues.
If we run below command it works
opa_windows_amd64.exe exec --format=pretty --set bundles.test.resource=file://c:/repos/test/rego/ path_to_json_folder
Hey there, thanks for the report. That version is pretty old, could you please try the same with 0.44.0, by any chance?
Sure, pretty sure the issue exists in the latest version when I looked at the code. Will do an actual check and get back.
This issue still exists with 0.44.0