Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info filter #500

Open
ok-nick opened this issue Jun 12, 2024 · 1 comment
Open

Add info filter #500

ok-nick opened this issue Jun 12, 2024 · 1 comment

Comments

@ok-nick
Copy link

ok-nick commented Jun 12, 2024

I'm currently using insta_cmd where my command takes an absolute path as an argument. The problem is that when snapshots are taken, the info includes my username and other specific path info:

---
source: tests/test_view.rs
info:
  program: my_program
  args:
    - info
    - /Users/my_username/Documents/my_image.jpg
---

I'd like to avoid exposing my username and local filesystem structure and keep the info more general. For now I'll hide all of the info, but it'd be better if it can be filtered. This issue is applicable to both insta and insta_cmd because of how it records the info.

Edit: It seems using Settings::set_raw_info or Settings::remove_info or Settings::remove_description doesn't actually hide the info, so I'm not sure if a workaround exists for this issue?

@mitsuhiko
Copy link
Owner

This is a known issue with insta-cmd at the moment. Right now I recommend to use inline snapshots which will omit this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants