microsoft / microsoft/winget-cli
Path environment variable is not registered correctly when Windows user name contains multibytes
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
If a Windows user name contains multibyte characters, the path environment variable for applications added using winget install will be registered with garbled characters and the application path cannot be resolved.
Steps to reproduce
❯ echo $env:HOME
C:\Users\杉山洋一
❯ winget install jqlang.jq
見つかりました jq [jqlang.jq] バージョン 1.7.1
このアプリケーションは所有者からライセンス供与されます。
Microsoft はサードパーティのパッケージに対して責任を負わず、ライセンスも付与しません。
ダウンロード中 https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-amd64.exe
██████████████████████████████ 962 KB / 962 KB
インストーラーハッシュが正常に検証されました
パッケージのインストールを開始しています...
パス環境変数が変更されました; 新しい値を使用するにはシェルを再起動してください。
コマンド ライン エイリアスが追加されました: "jq"
インストールが完了しました
❯ jq
jq: The term 'jq' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
❯ echo $env:path
........;C:\Users\譚牙アア豢倶ク\AppData\Local\Microsoft\WinGet\Packages\AlDanial.Cloc_Microsoft.Winget.Source_8wekyb3d8bbwe
Expected behavior
Environment variables are set to account for paths containing multibytes
Actual behavior
Garbled characters occur.
Environment
❯ winget --info
v1.7.10661 の Windows パッケージ マネージャー
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.3155
システム アーキテクチャ: X64
パッケージ: Microsoft.DesktopAppInstaller v1.22.10661.0
Winget ディレクトリ
-----------------------------------------------------------------------------------------------------------------------
ログ %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalSta…
ユーザー設定 %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalSta…
ポータブル リンク ディレクトリ (ユーザー) %LOCALAPPDATA%\Microsoft\WinGet\Links
ポータブル リンク ディレクトリ (マシン) C:\Program Files\WinGet\Links
ポータブル パッケージ ルート (ユーザー) %LOCALAPPDATA%\Microsoft\WinGet\Packages
ポータブル パッケージ ルート C:\Program Files\WinGet\Packages
ポータブル パッケージ ルート (x86) C:\Program Files (x86)\WinGet\Packages
インストーラのダウンロード %USERPROFILE%\Downloads
リンク
-----------------------------------------------------------------------------------
プライバシーに関する声明 https://aka.ms/winget-privacy
使用許諾契約 https://aka.ms/winget-license
サード パーティに関する通知 https://aka.ms/winget-3rdPartyNotice
ホーム ページ https://aka.ms/winget
Windows ストアの使用条件 https://www.microsoft.com/en-us/storedocs/terms-of-sale
管理者設定 状態
----------------------------------------------
LocalManifestFiles 無効
BypassCertificatePinningForMicrosoftStore 無効
InstallerHashOverride 無効
LocalArchiveMalwareScanOverride 無効
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file or test. Start by reproducing the winget install in PowerShell with a multibyte Windows user name, then trace the path environment-variable registration flow. Done means the registered path preserves the user name and the installed jq command resolves successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100