Closed j-quelly closed 3 years ago
Hey @j-quelly! You're using the old "CLI" (@percy/agent) docs with the new CLI package. The new proper CLI snapshot
docs are located here: https://docs.percy.io/docs/cli-snapshot
I've added a warning to the top of the current snapshot docs (for @percy/agent). 👍🏼 We're aiming to have @percy/agent
fully deprecated by the end of the quarter and all SDKs migrated over to the new toolchain (follow along on #57)
As for the globs, can you add --verbose
to get debug logs?
Hey @j-quelly! I wanted to add that the globs and your arguments are likely not being interpreted correctly.
For instance, in your second example your shell is automatically expanding the glob (as mine does). That’s why the error is from zsh and not Percy. You’ll want to make sure you add quotes to the glob to prevent that from happening.
For your last example, you have the ignore flag followed by three directories, but how will the command know which arguments belong to the flag and which arguments might be positional arguments? It can’t, so it only treats the first arg as the value and ignores the rest.
To use multiple globs, you must specify the flag multiple times (--ignore blog --ignore docs --ignore legacy-docs
). You could also construct a single glob to match all files (e.g. --ignore "{blog,docs,legacy-*}"
).
Hope this helps!
Going to close out but feel free to keep commenting :)
The documentation does not match output of
--help
from the CLI. Everything that's documented returns an errorError: Unexpected arguments:
Only after 45 minutes of trial and error did I learn that the correct arguments are:
Results in snapshotting what I want for one use case
It seems globs are not working. 🤦 ie:
Ignore is also not working with and without glob
It appears removing dry run may fix this????