Skip to content

Invoke-Formatter: Accept input from pipeline - #1763

Merged
James Truher (JamesWTruher) merged 3 commits into
PowerShell:masterfrom
bergmeister:formatter/pipe
Aug 11, 2022
Merged

Invoke-Formatter: Accept input from pipeline#1763
James Truher (JamesWTruher) merged 3 commits into
PowerShell:masterfrom
bergmeister:formatter/pipe

Conversation

@bergmeister

@bergmeister Christoph Bergmeister (bergmeister) commented Jan 19, 2022

Copy link
Copy Markdown
Collaborator

PR Summary

Implements #1761

PR Checklist

@bergmeister Christoph Bergmeister (bergmeister) changed the title Invoke-Formatter: Accept input from pipeline for main -ScriptDefinition parameter Invoke-Formatter: Accept input from pipeline Jan 19, 2022
@kilasuit

Copy link
Copy Markdown
Contributor

LGTM Christoph Bergmeister (@bergmeister) :-)

@bergmeister

Copy link
Copy Markdown
Collaborator Author

Close and re-open so that Github removes the pending MacOs check which has been fixed/removed upstream in master

'foo' | Invoke-Formatter | Should -Be 'foo'
}
It 'Value from Pipeline by Property Name with just the mandatory ScriptDefinition parameter' {
[pscustomobject]@{ 'ScriptDefinition' = 'foo' } | Invoke-Formatter | Should -Be 'foo'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[pscustomobject]@{ 'ScriptDefinition' = 'foo' } | Invoke-Formatter | Should -Be 'foo'
[pscustomobject]@{ 'ScriptDefinition' = 'command1;command2' } | Invoke-Formatter | Should -Be 'command1; command2'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks fine - just one suggestion below

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants