Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Invoke-item fails when a space in the path #2900

Copy link
Copy link
@rcw5

Description

@rcw5
Issue body actions

I am running PowerShell on my Mac - there is an issue not fixed in 6.0.0 alpha 14 where invoke-item fails when there is a space in the path. It appears to treat the space as a separator as it attempts to open two paths instead of one.

Steps to reproduce

Create a file, /tmp/My Folder/test.txt

mkdir '/tmp/My Folder'
"Hello" | Out-File '/tmp/My Folder/test.txt' -Force

cd to that folder then call Invoke-Item

cd '/tmp/My Folder'
invoke-item ./test.txt

Expected behavior

Text file should open in TextEdit (at least on my Mac, although I expect default editors vary)

Actual behavior

Error written to PoSH console:

The files /tmp/My and /Users/rcw5/Folder/test.txt do not exist.

If you rename My Folder to MyFolder then invoke-item works as expected.

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.14
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.