Repository navigation
fix(ci): use pipefail to capture turbo exit code - #100
Merged
Merged
Conversation
The previous implementation used `set +e` and `$?` to capture the exit code, but `$?` only reflects the exit code of the last command in a pipe (tee), not the first command (turbo). This caused CI to pass even when turbo tasks (like i18n:run) failed. Fix: Use `set -o pipefail` to ensure the pipe returns the exit code of the first failing command.
Added placeholder translations for: - security.json: payPassword.* keys (16 keys) - transaction.json: sendPage.payPassword* keys (4 keys) Languages fixed: zh-TW, ar
createRequire from 'module' is a Node.js API that doesn't work in browser builds. Vite can handle CommonJS-to-ESM conversion automatically when importing .cjs files directly. This fix unblocks the build which was previously passing due to CI bug.
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.
问题
CI 配置中使用管道
pnpm turbo run ... | tee turbo-output.log时,$?只反映tee的退出码(总是 0),而不是turbo的退出码。这导致即使 turbo 任务(如
i18n:run)失败,CI 仍然报告成功。修复
使用
set -o pipefail确保管道返回第一个失败命令的退出码。证据
PR #99 的 CI 日志显示: