Stop depending on getconf in env helper specs - #9856
Merged
Conversation
Windows has no `getconf`, so these examples raise Errno::ENOENT on mswin unless MSYS2 or Git for Windows happens to be on PATH. Keep the current PATH as the base there, which also preserves the directories the Ruby under test loads its DLLs from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
nmake test-bundler-parallelon mswin fails inspec/runtime/env_helpers_spec.rbwithErrno::ENOENT: No such file or directory - getconf PATH. Windows has nogetconf, so these two examples only pass when MSYS2 or Git for Windows happens to be onPATH, and neither is a requirement for running the specs.Even when it did resolve,
getconf PATHreturned/bin:/usr/bin, so the examples setPATHto a value that means nothing on Windows. They passed only because every command they run is invoked by absolute path.The examples just need some base
PATHto round-trip throughBUNDLER_ORIG_PATH, sodefault_system_pathkeeps the currentPATHon Windows, which also preserves the directories the Ruby under test loads its DLLs from. Verified on mswin: 18 examples, 0 failures.Generated with Claude Code