-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-Consolethe console experiencethe console experience
Description
Steps to reproduce
Function Get-SomeData {
Clear-Host
$somedata="somedata"
return $somedata
}
$myData = Get-SomeData
$myData[0] # will clear the screen
$myData[1] # "somedata"
$myData.Count # will be 2
Expected behavior
Function should return a single value ("somedata")
Actual behavior
Function returns an array with the Clear-Host command as the first object
Environment data
Verified in:
| Name | Value |
|---|---|
| PSVersion | 6.2.0 |
| PSEdition | Core |
| GitCommitId | 6.2.0 |
| OS | Linux 4.15.0-47-generic #50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019 |
| Platform | Unix |
| PSCompatibleVersions | 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.2.0 |
| PSRemotingProtocolVersion | 2.3 |
| SerializationVersion | 1.1.0.1 |
| WSManStackVersion | 3.0 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-Consolethe console experiencethe console experience