Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public sealed class WriteInformationCommand : PSCmdlet
/// </summary>
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true)]
[Alias("Msg", "Message")]
[AllowNull]
public object MessageData { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,12 @@ Describe "Stream writer tests" -Tags "CI" {
$result.Count | Should -Be $returnCount
(Compare-Object $result $returnValue -SyncWindow 0).length | Should -Be 0
}

It "Write-Information accepts `$Null" {
$streamPath = Join-Path $testdrive information.txt
$null | Write-Information -Tags myTag -ErrorAction Stop -InformationAction SilentlyContinue -InformationVariable i
Comment thread
SteveL-MSFT marked this conversation as resolved.
$i.Tags | Should -BeExactly "myTag"
$i.MessageData | Should -Be $null
}
}
}