Repository navigation
test: 内核解压测试不再在 Windows 上假红 - #11
Merged
Merged
Conversation
这条测试从 PR #7 起在 windows-latest 上一直失败,但代码本身没问题: Windows 内核走 zip 分发,tar + .app 相对链接只服务 macOS。 - 保留 .app 相对链接的用例:加能力探测,本机建不出可穿越的目录符号链接时 带原因跳过(Windows 无开发者模式是 EPERM,有权限时 Node 也建出文件型链接)。 - 越界链接必须被拒的安全用例:改用直接写 tar 头构造成员,不再依赖 fs.symlinkSync —— 于是这条安全断言在每个平台都真跑,不再被跳过掩盖。
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.
问题
main的 WDH runtime 在windows-latest一直失败:这个红灯从 PR #7(
02b90e0)起就存在,不是新回归,也不影响产品代码:matchAsset/downloadGithub),extractKernel的 tar 分支只服务 macOS/Linux 的.app结构。fs.symlinkSync('MacOS', ...)造「相对目录符号链接」:Windows 无开发者模式直接EPERM;有权限时 Node 仍建出文件型链接,无法当目录穿越 → 解压后realpath失败。改动
只动测试,不碰产品代码:
relativeDirLink:真建一次并穿过去读;建不出来或穿不过去时带原因skip(跳过信息写明平台与错误码)。2+linkpath)构造成员,不再依赖fs.symlinkSync。于是这条安全断言在每个平台都真跑,不会被跳过掩盖;并补了absup绝对路径变体。验证
本地 Windows(无符号链接特权):
Linux 上该跳过用例会正常执行,符号链接保留逻辑仍被覆盖。
与 #10 的关系
#10 建分支时基于
fix/github-rate-limit-fallback,误把 PR #8 的改动带了进来,已关闭。本条从origin/main干净切出,只含一个测试文件。合并后
main的 windows-latest 变绿。