Skip to content

fix(gem): name the skipped BUNDLE_PATH verbatim in the config-ignored warning - #225

Closed
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
mainfrom
fix/gem-config-warning-windows
Closed

fix(gem): name the skipped BUNDLE_PATH verbatim in the config-ignored warning#225
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
mainfrom
fix/gem-config-warning-windows

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What

Main's test (windows-latest) job is red since #222 merged (inherited by every open PR, e.g. #224's run 32384542775): all three in_process_gem_config_warning tests fail because the gem_bundle_config_path_ignored warning detail interpolates the refused config value with {value:?} — Rust's Debug formatting, which escapes backslashes. On Unix the Debug and Display forms coincide (temp paths carry no backslashes), so #222's CI was green; on Windows the detail says C:\\Users\\RUNNER~1\\… while the tests (correctly) expect the real path C:\Users\RUNNER~1\…. Beyond the tests, the doubled backslashes mangle the path for any human copy-pasting it out of the warning.

Fix: format with Display inside manual quotes in the shared config_path_ignored_warning builder (one site — scan/apply/stderr all flow through it). The value is a single scraped config line, so Display can't smuggle in newlines the quotes would mask.

Tests

New platform-independent pin config_path_ignored_warning_names_the_value_verbatim: a backslash-bearing value (C:\Users\dev\bundle store) must appear verbatim in the detail and C:\\Users must not — {:?} doubles backslashes on every OS, so this is RED under the old format on Linux/macOS too, not just Windows.

Green on this branch: crawlers::ruby 51/51 (incl. the new pin), in_process_gem_config_warning 3/3, in_process_gem_fallback_home 4/4, clippy -D warnings clean.

🤖 Generated with Claude Code


Note

Low Risk
Warning-text formatting only; containment and skip behavior are unchanged. A new unit test covers the Windows-escaping regression.

Overview
Fixes the gem_bundle_config_path_ignored warning so the refused config BUNDLE_PATH is shown verbatim, not Debug-escaped.

config_path_ignored_warning now interpolates with Display inside quotes ("{value}") instead of {value:?}. Debug doubled backslashes, so Windows warnings (and CI substring checks) showed C:\\Users\\… for a config that says C:\Users\…. Scan, apply, and stderr all share this builder.

Adds config_path_ignored_warning_names_the_value_verbatim with a backslash-bearing path so the unescaped form is pinned on every OS.

Reviewed by Cursor Bugbot for commit 791839a. Configure here.

… warning

The gem_bundle_config_path_ignored detail interpolated the refused config
value with `{value:?}` (Debug), which escapes backslashes. On Unix the two
forms coincide (temp paths carry no backslashes), but on Windows the
warning printed `C:\\Users\\…` for a config that says `C:\Users\…` —
failing all three in_process_gem_config_warning tests on the
windows-latest CI leg (red on main since #222 merged, inherited by every
open PR) and mangling the path for any human copy-pasting it out of the
warning.

Format with Display inside manual quotes instead. The value is a single
scraped config line, so Display cannot smuggle in newlines the quotes
would mask. New platform-independent unit test pins it with a
backslash-bearing value: `{:?}` doubles backslashes on every OS, so the
pin is RED under the old format everywhere, not just on Windows.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Absorbed into #224: main is red on two independent required checks (hosted-e2e ← bun 1.4 lockfileVersion; windows-latest ← this Debug-escaping bug), so this PR and #224 deadlocked — each red on exactly the check the other fixes, and neither could ever go green alone. #224 now carries this commit (791839a cherry-picked verbatim) and should pass both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant