GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix accidental wrapping of scalar Write-Output input by mklement0 · Pull Request #5552 · PowerShell/PowerShell

Conversation

@mklement0

@mklement0 Michael Klement (mklement0) commented Nov 26, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

when -NoEnumerate is used. Fixes #5122.

Note: This PR is a compromise that attempts to reconcile PetSerAl's conceptually cleaner, but abandoned #5123 with the conflicting changes in #2038.

#2038 should never have happened and continues to cause problems.

Specifically, the implications of this PR are:

  • a single scalar input object is now also passed through when -NoEnumerate is specified, as is desirable

    • the price to pay is that Write-Output -NoEnumerate 1 is now indistinguishable from Write-Output -NoEnumerate -InputObject ([System.Collections.Generic.List[object]]::new((, 1)))
  • by changing the -InputObject parameter type from [psobject[] to [object], multi-argument inputs passed without explicit use of -InputObject are now passed through as a [List[object]] instance when using -NoEnumerate, which is an unfortunate side effect of how ValueFromRemainingArguments arguments are reported - see A ValueFromRemainingArguments parameter by default invariably receives a [List[object]] collection rather than a scalar / PowerShell array ([object[]]), as appropriate #4625.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mklement0
Fix accidental wrapping of scalar Write-Output input
673117c
when -NoEnumerate is used.

Fix PowerShell#5122
@mklement0
Michael Klement (mklement0) requested review from James Truher (JamesWTruher), Paul Higinbotham (PaulHigin) and Dan Travison (dantraMSFT) as code owners November 26, 2017 20:44
@iSazonov
Ilya (iSazonov) requested a review from Jason Shirk (lzybkr) November 27, 2017 03:36
@iSazonov Ilya (iSazonov) assigned Dongbo Wang (daxian-dbw) Nov 27, 2017
@lzybkr
Jason Shirk (lzybkr) removed their request for review March 14, 2018 16:27
@stale

stale Bot commented Apr 13, 2018

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stale stale Bot added the Stale label Apr 13, 2018
@stale

stale Bot commented Apr 23, 2018

Copy link
Copy Markdown

This PR has be automatically close because it is stale. If you wish to continue working on the PR, please first update the PR, then reopen it.
Thanks again for your contribution.
Community members are welcome to grab these works.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stale stale Bot closed this Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dantraMSFT Dan Travison (dantraMSFT) Awaiting requested review from dantraMSFT
@JamesWTruher James Truher (JamesWTruher) Awaiting requested review from JamesWTruher
@PaulHigin Paul Higinbotham (PaulHigin) Awaiting requested review from PaulHigin

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@daxian-dbw Dongbo Wang (daxian-dbw)

Labels

Stale

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mklement0 @BrucePay @daxian-dbw
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.