Skip to content

Parameter starting with colon (:) is expanded with working directory. #15435

@no1xsyzy

Description

@no1xsyzy

Only happens when spawning other processes, any parameter starting with colon (:) is expanded with working dir if not wrapped by single quote (').

I tried existing pre-release in this repo and found that the problem is between v7.1.3..v7.2.0-preview.1, though I do not have compiling environment at hand for bisecting deeper. aur/powershell-preview-bin 7.2.0.preview.5-1 also bugs. Results from ProcMon maybe help?

More information can be found here (SuperUser question).

Steps to reproduce

PS D:\path > cmd /c "echo" ":foo"
PS D:\path > cmd /c "echo" ':foo'

Expected behavior

:foo
:foo

Actual behavior

D:\path\:foo
:foo

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.0-preview.4
PSEdition                      Core
GitCommitId                    7.2.0-preview.4
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.Resolution-DuplicateThe issue is a duplicate.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions