Reviving a `tailor` issue I'm running into when cr...
# general
Reviving a
issue I'm running into when creating something with pre-commit: I'd like to just pass filenames from pre-commit, but the issue is stuff in
. Anything in
that shows up on the command line causes pants to error out. Example:
Copy code
❯ ./pants tailor --check aiven/ 
14:28:43.11 [ERROR] 1 Exception encountered:

  Exception: Unmatched glob from CLI arguments: "aiven/"

Do the file(s) exist? If so, check if the file(s) are in your `.gitignore` or the global `pants_ignore` option, which may result in Pants not being able to see the file(s) even though they exist on disk. Refer to <>.
Is there a way to avoid this? Or do I need to filter before passing to
the path I want?
Yes this is what I want
it would be good if we could mention that option in the error message, although wiring it is a little awkward because the error message is created in Rust, so it's a lot of boilerplate to pass down the string but maybe worth it
Probably easier thing would be updating the docs around tailor, like how to set up a pre-commit hook, (just adding an example pre-commit hook would be great)
contribution definitely welcomed if you have a moment. docs are now in repo
📌 1
👍🏻 1
Copy code
- id: pants-tailor
      name: "Ensure BUILD metadata exists (Pants Tailor)"
      entry: ./pants --unmatched-cli-globs=ignore tailor --check
      language: system
      stages: [ commit, push ]
      pass_filenames: true