aspnet / dnvm

OBSOLETE - see readme
Other
174 stars 61 forks source link

DNVM produce incorrect script for adding to PATH for non-English users #502

Closed Ermesx closed 7 years ago

Ermesx commented 8 years ago

When I use KoreBuild from aspnet/Universe repo I encounter issue with non-English characters in the path. My path is C:\Users\Wojtek Gadziński\.dnx\... When dnvm.ps1 generate temp script for adding runtime to the PATH is used cmdlet Out-File with option ASCII

function Set-Path() {
    param(
        [string] $newPath
    )

    $env:PATH = $newPath

    if($CmdPathFile) {
        $Parent = Split-Path -Parent $CmdPathFile
        if(!(Test-Path $Parent)) {
            New-Item -Type Directory $Parent -Force | Out-Null
        }
        _WriteDebug " Writing PATH file for CMD script"
        @"
SET "PATH=$newPath"
"@ | Out-File $CmdPathFile ascii
    }
}

and this produce for me command like SET "PATH=C:\Users\Wojtek Gadzi?ski\.dnx\runtimes\... It converts my ń to ? and after that sake stops working. I feel discriminated :)

I found solution/workaround for it. Helps change ascii encoding to oem Out-File $CmdPathFile oem - It uses the current original equipment manufacturer code page identifier for the operating system. I'm not sure if this is solution for everyone. It should be checked.

Best Regards.

muratg commented 8 years ago

Thanks @Ermesx, and sorry for the trouble! Happy that you found a workaround!

In RC2, we're retiring DNVM, DNX and DNU and will move to using dotnet CLI instead.

Instead of closing, moving this to backlog for now, so if others hit this issue with their languages, they can try the workaround.