support match settings for windows - #607
Merged
Merged
Conversation
| } | ||
|
|
||
| if ($match_settings -and !$canMatchSettings) { | ||
| Write-Output "Warning: -match_settings flag not supported for the specified resources." |
Contributor
There was a problem hiding this comment.
Should this only be a log? The user has asked for something that we cannot comply with. I feel like this should throw an error.
Contributor
Author
There was a problem hiding this comment.
good point, if we can't do what they ask it makes more sense to fail.
| $toTagsExcept = $toVersionData.version.propertyBag.tags.except | ||
| if ($toTagsOnly -and $toTagsOnly.Count -gt 0 ) { | ||
| $matchedTag = $false | ||
| foreach ($tag in $toTagsOnly) { |
Contributor
There was a problem hiding this comment.
I'm playing "code golf" here, but you could check $tags.Where({$_ -like $tag}).Count and get rid of the manual looping.
Contributor
Author
There was a problem hiding this comment.
thanks, I'm not familiar enough with ps to know these kinds of things, but that shaves off a decent number of lines while maintaining readability.
trriplejay
force-pushed
the
master
branch
2 times, most recently
from
October 26, 2018 17:51
820edcf to
1849863
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#606