cmake-find-package.sh: 作業ディレクトリを mktemp -d で作成 - #177
Open
k-yoshimi wants to merge 3 commits into
Open
Conversation
"${TMPDIR}find-package.$$" created (and rm -rf'ed) a directory in
the current directory when TMPDIR was unset, assumed a trailing
slash, and used a predictable name.
Fixes #171
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CMake 4.x removed compatibility with < 3.5, so the debug helper always failed to configure. 3.8 matches cmake-find-package.sh. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
AI review cycle (Codex + Antigravity) 結果Phase 1 (Codex): must_fix 0。BSD/GNU mktemp 互換性、macOS の末尾スラッシュ付き TMPDIR( Phase 2 (Antigravity): 姉妹スクリプト Phase 1 再レビュー(エスカレーション): 指摘ゼロ。 → 両フェーズ収束。 |
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.
概要
Fixes #171
WORK_DIR="${TMPDIR}find-package.$$"には以下の問題がありました。TMPDIR未設定(Linux で一般的)だと相対パスになり、カレントディレクトリに作業ディレクトリを作成して最後にrm -rfしていたTMPDIR末尾スラッシュ(macOS の慣習)を仮定$$による予測可能な名前WORK_DIR=$(mktemp -d "${TMPDIR:-/tmp}/find-package.XXXXXX") || exit 1に変更しました。検証(macOS で実施)
TMPDIRあり/なし(env -u TMPDIR)の両方でsh scripts/cmake-find-package.sh ZLIB ZLIB_VERSION_STRINGが1.2.12を返し exit 0🤖 Generated with Claude Code