Install-Junction fails when the path contains a special char such as [ or ]

Create issue
Issue #190 resolved
Matt Withum created an issue

First: Thanks for Carbon - it is really amazing!

The Install-Junction.ps1 file checks for existing files by using:

if( -not (Test-Path -Path $Target -PathType Container) )

This will fail when the $Target contains special chars such as []. You can fix this by using the -LiteralPath arg:

if( -not (Test-Path -LiteralPath -Path $Target -PathType Container) )

I can't see a good reason not to use the literal path in this scenario - creating junctions using wildcards isn't really an option.

Comments (3)

  1. Aaron Jensen repo owner

    I added LiteralPath support to all junction functions. These will be part of Carbon 2.2.0.

  2. Log in to comment