Repository navigation
fix(ci): 校验器的输出改走 stderr,修复 macOS 打包检查 - #2
Closed
xiaoyumuxi wants to merge 1 commit into
Closed
xiaoyumuxi wants to merge 1 commit into
xiaoyumuxi wants to merge 1 commit into
Conversation
CI 用 $(scripts/build-package.sh ...) 取包路径。verify-package.sh 调用 LitheOfficialPluginVerifier 和 LithePluginPackageSigner --verify 时,它们的结果打印到了 stdout,混进了取到的路径,archive-package.sh 因此报 --package must name a dev.lithe.plugin.java-support package directory。
xiaoyumuxi
marked this pull request as ready for review
November 5, 2026 05:39
Contributor
Author
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.
这个 PR 做了什么
修复 main 上 “Build and verify the macOS packages” 的失败(run 41947015142)。
原因
package=$(scripts/build-package.sh --arch "$arch" --host-tools "$HOST_TOOLS")取包目录。build-package.sh会调用verify-package.sh。带--host-tools时,后者再调用LitheOfficialPluginVerifier;如果包已签名,还会调用LithePluginPackageSigner --verify。Verified dev.lithe.plugin.java-support as a declarative package打印到 stdout,这一行混进了$package。archive-package.sh收到的不是一个目录,于是报--package must name a dev.lithe.plugin.java-support package directory,退出码 2。arm64 包本身已经构建并校验通过,失败只发生在归档这一步。改动
scripts/verify-package.sh:两个宿主校验器的输出重定向到 stderr。脚本头部的注释写明它的输出全部走 stderr,调用方捕获 stdout 时拿不到任何内容。verify-package.sh而不是build-package.sh,是因为archive-package.sh也会调用它,并且 stdout 只应输出<sha256> dist/<asset>。改在这里,两个调用方都不会再被污染。验证
LitheOfficialPluginVerifier:确认它会往 stdout 打印上面那一行。.artifacts/package/arm64/dev.lithe.plugin.java-support运行修改后的scripts/verify-package.sh --host-tools ...:退出码 0,stdout 为 0 字节。zsh -n scripts/verify-package.sh和git diff --check都通过。