Chef: # berks package -e [GROUP, GROUP] issue


I am facing problem using berks package command.
where I want to exclude all test dependencies from my Berksfile while creating a .tar file using
"berks package" command
as I want to exclude the test dependencies as per chef docs the command that is given for excluding more than on test group is

berks package -e [GROUP, GROUP] / berks package --except [GROUP, GROUP]

is not working as it is supposed to be working.
I have a cookbook
eg. example
and I have test dependencies in Berksfile


so as I have added a screen shot
it has two groups
ie. test and solo
so the command that should be working with those groups must be

berks package -e [test, solo]

which is not working and not excluding any of test cookbook
instead it is working fine with single test dependency group mentioned
ie. berks package -e test (or solo)

I have screen shot after using berks package -e [test, solo]

as I un-tar the file in cookbook directory it shows all the cookbooks including those test groups..

please help me in this scenario...


The braces in the documentation are not to be included in the final command. Please try
berks package -e test,solo.

Hi joerg.herzinger,

thanks for the suggestion, but its not working .
it is packaging everything including all the test dependencies.
I have already tried all the arrangements.
berks package -e [test, solo]
berks package -e [“test”, “solo”]
berks package -e [‘test, solo’]
berks package -e “test”, "solo"
berks package -e test, solo
and many more…
all above commands with -e / --except
but its not working as it should be …

Sorry, I got the format wrong. If you check berks package --help you will see. The correct form should be berks package -e test -e solo.

Hey thanks for that,
it works but partial kind of
i have found a working pattern
berks package --except=test solo …
this is working like charm …
thanks for your direction… :slight_smile: