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

Tags appear to be evaluated with OR instead of AND #86

Open
csandfeld opened this issue Jun 23, 2017 · 3 comments
Open

Tags appear to be evaluated with OR instead of AND #86

csandfeld opened this issue Jun 23, 2017 · 3 comments

Comments

@csandfeld
Copy link
Contributor

Based on the description in issue #3 (and I think I saw it elsewhere also, but cannot find that right now) I expected only deployments tagged with all specified tags, to be invoked when I call invoke-psdeploy with multiple tags. But my tests show that the opposite is the case. Apparently all deployments that have any of the specified tags are invoked (see attached gif)

2017-06-23_17-48-45

@RamblingCookieMonster
Copy link
Owner

Yeah, both the parameter docs and that are wrong, it currently uses the equivalent of or

Guessing we should:

  • Update docs to indicate it's an or
  • Add an option (everywhere a user can specify tags) to allow using and... e.g. -TagOperator with validateset, or an appropriately named switch param

Would prefer that to changing the default behavior, guessing that might break existing workflows for some folks

Thanks for pointing this out!

@csandfeld
Copy link
Contributor Author

I agree - changing the current default behavior would come with a high risk of messing it up for existing deployments depending on tags.

A -TagOperator parameter or something similar would be nice.

@Line40
Copy link

Line40 commented Sep 25, 2018

Hi there, I would like to help with implementing this feature, in fact I already did implement a -TagsAnd switch for Invoke-PSDeploy that causes the Tags to be And'ed. However I don't particularly like the paramter name I chose, and maybe the PSDeploy way to do it would rather be something else. So i'd be happy to implement a different approach if there is one.
I'm also open to implemting -TagOperator suggested by @csandfeld , but since, at least from how I understood what -TagOperator should be like, the only viable options would be -TagOperator And and -TagOperator Or I'm not sure if thats not overkill?

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

No branches or pull requests

3 participants