addlicense icon indicating copy to clipboard operation
addlicense copied to clipboard

Ignore doesn't work without equals sign

Open makandre opened this issue 2 years ago • 2 comments

I'm using the addlicense container like so:

$ podman run --rm -v $PWD:/src ghcr.io/google/addlicense -v -check -ignore node_modules/** .

But this doesn't skip node_modules directory. However, if I changed it to -ignore=node_modules/**, then it skips node_modules as expected.

If this isn't a bug then it should be made clear in the readme that = is required

makandre avatar Apr 18 '22 14:04 makandre

My guess is that your shell is interpreting the "**" before it gets passed to addlicense. What happens if you put it in quotes?

$ podman run --rm -v $PWD:/src ghcr.io/google/addlicense -v -check -ignore "node_modules/**" .

Assuming that works, this is pretty normal and expected, but probably worth a mention in the docs as you say.

willnorris avatar Apr 18 '22 15:04 willnorris

Thanks for the quick reply. Yes you are right, putting in quotes works.

makandre avatar Apr 18 '22 15:04 makandre