Skip to content

Should Test-Connection parameter -Continues be -Continuous ? #9235

Closed

Description

@HumanEquivalentUnit

I can't say grammatically why it should be, but it feels like it should be.

And aliased with Continues for compatibility.

Activity

  1. added
    Issue-Question
    on Mar 27, 2019
  2. changed the title [-]Should `Test-Connection -Continues` be `-Continuous`?[/-] [+]Should Test-Connection parameter -Continues be -Continuous?[/+] on Mar 27, 2019
  3. changed the title [-]Should Test-Connection parameter -Continues be -Continuous?[/-] [+]Should Test-Connection parameter -Continues be -Continuous ?[/+] on Mar 27, 2019
  4. mklement0 commented on Mar 27, 2019

    @mklement0
    Contributor

    Honestly, it sounds -Continuous was intended and simply misspelled.

    (If you conceived of it as a verb in the imperative mood, it would have to be -Continue, without the s).

  5. GeeLaw commented on Mar 28, 2019

    @GeeLaw

    As a side note, the switch is exhibiting strange behavior when turned off on PowerShell Core 6.1.2 for macOS.

    test-connection -continues:$false localhost | foreach-object { "hello $_" }
    # the output is written to the host, not the output pipe
    
    test-connection -continues localhost | foreach-object { "hello $_" }
    # the output is passed to the output pipe and produces expected result
    
    # also, & { test-connection localhost } pollutes
    # the console/terminal/screen buffer before
    # returning the object result.

    The reason is the cmdlet is coded s.t. somehow it only looks at the parameter set (or forgets to look at the parameter set, or resolves the "overload" in an otherwise incorrect way)? (The same mistake is made for Get-AppxPackage -Online:$false, which crashes the process; but that's Windows-specific.) I guess this is worth another issue?

  6. vexx32 commented on Mar 28, 2019

    @vexx32
    Collaborator

    It's not to do with this parameter. The PS Core implementation of Test-Connection writes a majority of its data to the host stream, and then submits a rather less useful object to the output stream. We have another issue on that somewhere, Ilya (@iSazonov) might know where. Too sleepy at the present to dig that one up.

    I've been looking at fixing it and am happy to work on it, but we need to come to some consensus on what exactly the inner workings of that fix need to be first. 🙂

  7. iSazonov commented on Mar 28, 2019

    @iSazonov
    Collaborator

    After we move to .Net Core 3.0 we get some updates related to the cmdlet. Not all bugs was fixed there but we could review the cmdlet.
    And main question is still how balance interactive and script experience.

  8. iSazonov commented on Oct 17, 2019

    @iSazonov
    Collaborator
  9. vexx32 commented on Oct 17, 2019

    @vexx32
    Collaborator

    I can reference it in #10697 so this closes when that is merged, since that's not merged just yet. 🙂

  10. removed their assignment
    on Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-QuestionResolution-FixedWG-Cmdlets

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions