Skip to content

dsh-remote v0.8.28 — 修 isInstalledCopy 的跨平台路径判断(0.8.27 CI 红)

Choose a tag to compare

@flymysql flymysql released this 30 Sep 07:00
· 235 commits to main since this release

修 isInstalledCopy 的跨平台路径判断(0.8.27 CI 红)

0.8.27 的"拒绝覆盖源码仓库"判断在 Linux 上用了本机的路径分隔符,导致 Windows 风格路径被误判(本机绿、CI 红)。此版修正为两种分隔符都认。

升级方式

# npm 用户(推荐)
dsh plugin --profile web add dsh-remote@latest

# 或在设置页 → 更新 处点击「立即更新」
# 若 updateMode=auto(0.8.27 起默认),会自动更新

正常升级即可。

本版变更

修 isInstalledCopy 的跨平台路径判断(0.8.27 CI 红)

0.8.27 的"拒绝对非安装副本自更新"逻辑在 Linux CI 上误判:isInstalledCopy
只按 path.sep 切分路径,于是在 Linux 上判断 Windows 风格路径时
(C:\...\node_modules\dsh-remote)切不开,被判为"非安装副本"——本机 Windows
全绿、CI 直接红(246 例 fail 1)。现在同时把 \ 与 / 归一化,两种平台的
路径都给出正确答案。

  • 教训同 os.homedir() 那一类:跨平台判断不能依赖本机的 path.sep,
    这类缺陷只在另一种平台上暴露,必须让判定函数自身与分隔符无关。
  • 测试补充了 5 条路径用例(Windows/POSIX × 安装副本/源码检出 + CI 检出路径)。

安装:npm install dsh-remote@0.8.28 · npm 页面 · 完整变更记录