fix: 修复中文路径下 BASH_ENV 编码异常及 Skills 路径不可用#255
Merged
btc69m979y-dotcom merged 1 commit intomainfrom Mar 4, 2026
Merged
Conversation
- 新增 singleWindowsPathToPosix() 将 BASH_ENV 预转换为 MSYS2 POSIX 格式, 避免路径含非 ASCII 字符时 MSYS2 自动转换在 LANG=C.UTF-8 生效前损坏路径, 导致 bash_utf8_init.sh 无法加载、后续命令输出乱码 - 将 SKILLS_ROOT 和 LOBSTERAI_ELECTRON_PATH 的反斜杠统一转为正斜杠, 避免 bash 环境中反斜杠被当作转义符导致路径解析失败
This was referenced Mar 5, 2026
mammut001
pushed a commit
to mammut001/LobsterAI
that referenced
this pull request
Mar 11, 2026
…-path-issues fix: 修复中文路径下 BASH_ENV 编码异常及 Skills 路径不可用
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Windows 环境下,当用户名或工作路径包含中文等非 ASCII 字符时,Cowork 会话中存在两类路径问题:
BASH_ENV做 Windows→POSIX 自动转换时,LANG=C.UTF-8尚未生效,导致非 ASCII 字符被损坏,bash_utf8_init.sh无法加载,后续所有 bash 命令输出乱码。改动
singleWindowsPathToPosix()工具函数,将BASH_ENV预转换为 MSYS2 POSIX 格式(如/c/Users/用户/...),绕过 MSYS2 的自动转换SKILLS_ROOT和LOBSTERAI_ELECTRON_PATH的反斜杠统一转为正斜杠,确保在 bash 和 Node.js 中均可正确解析Closes #215
Closes #224