PowerShellOrg / Plaster

Plaster is a template-based file and project generator written in PowerShell.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add compare-object to constrained runspace commands

gaelcolas opened this issue · comments

commented

Hi,
Lovin' Plaster and the new 'Parameter condition' feature!

I'd love to see the Compare-Object command from the constrained runspace for the conditions, especially when testing whether any value of an array (multichoice) is present in an array of values:
Compare-Object ${PLASTER_PARAM_Multichoice} @("val1","val2") -IncludeEqual -ExcludeDifferent

We can work around it, but it'd be easier and cleaner with the above for long lists.
i.e.
${PLASTER_PARAM_Multichoice}.contains("val1") -or ${PLASTER_PARAM_Multichoice}.contains("val2")

Thanks!

I think that would be a safe cmdlet to add. We're getting close to releasing an updated. I'll see if I can get this in for the update.

commented

I'm keener on the release, PSConf.asia is next week and I'd love to have it then :)
Anything I can (try to) do to help?