Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions crates/socket-patch-cli/src/commands/gem_refresh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2607,13 +2607,17 @@ mod tests {
let home = tmp.path().join("vendor/bundle/ruby/3.2.0");
let gem = installed("json", &home, true);
let (dir, _) = gem.installed.clone().unwrap();
let spec = home.join("specifications/json-1.0.0.gemspec");
// Joined part by part, as the remedy builds it: on Windows a `/`
// inside a joined part stays a `/`.
let spec = home.join("specifications").join("json-1.0.0.gemspec");
// The commands quote a path as `shell_word` does (a Windows path
// holds `\`); the warning's detail below lists the paths as they are.
let rm_rf = format!(
"run `rm -rf {} {} && bundle install`",
dir.display(),
spec.display()
shell_word(&dir),
shell_word(&spec)
);
let rm_f = format!("run `rm -f {} ", spec.display());
let rm_f = format!("run `rm -f {} ", shell_word(&spec));
let off = policy(tmp.path(), false, false, false);
let on = policy(tmp.path(), true, false, false);
let disabled = pass(std::slice::from_ref(&gem), &off).await;
Expand Down
Loading