-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Milestone
Description
Related: #4472.
The -LiteralPath parameter, via its -PSPath alias, is normally used to bind to objects piped from Get-ChildItem / Get-Item, such as with the Get-Content cmdlet.
Import-Csv currently fails to establish this binding.
Steps to reproduce
'file1.csv', 'file2.csv' | % { $null > $_ }
Get-ChildItem file*.csv | Import-CsvExpected behavior
Binding of the [System.IO.FileInfo] instances via their .PSPath property to -LiteralPath, and therefore no output (null collection), given that both files are empty.
Actual behavior
The following statement-terminating error is reported:
Import-Csv : You must specify either the -Path or -LiteralPath parameters, but not both.
Environment data
PowerShell Core v6.0.0-beta.4 on macOS 10.12.5
PowerShell Core v6.0.0-beta.4 on Ubuntu 16.04.2 LTS
PowerShell Core v6.0.0-beta.4 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)
Windows PowerShell v5.1.15063.413 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)lipkau and VeeFu
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-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module