https://cerbos.dev logo
Title
a

Amy Soetopo

08/22/2022, 11:59 PM
Hi, I’m trying to run tests on my machine with:
docker run -i -t \
    -v /path/to/policy/dir:/policies \
    -v /path/to/test/dir:/tests \
    <http://ghcr.io/cerbos/cerbos:0.20.0|ghcr.io/cerbos/cerbos:0.20.0> compile --tests=/tests /policies
(from the docs, and of course, updated with paths to my policies and tests locally) just an FYI, that the
--format
flag is invalid? getting this error:
cerbos: error: unknown flag --format
d

Dennis (Cerbos)

08/23/2022, 12:15 AM
docker run -i -t \
    -v /path/to/policy/dir:/policies \
    -v /path/to/test/dir:/tests \
    <http://ghcr.io/cerbos/cerbos:0.20.0|ghcr.io/cerbos/cerbos:0.20.0> compile --tests=/tests /policies
This works for me. What’s the error you’re getting? The
compile
command does not support the
--format
flag, if I understand your question.
a

Amy Soetopo

08/23/2022, 12:18 AM
Ah, okay, that would be it. Thanks!
d

Dennis (Cerbos)

08/23/2022, 12:19 AM
There’s another flag to control the format
-o, --output="tree"     Output format (tree,list,json)
a

Amy Soetopo

08/23/2022, 12:23 AM
Great, thank you!