diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-03-05 15:02:04 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-03-05 07:13:39 +0000 |
commit | b582e5a6e99c3e88076fc8eea794d0b3a23e8740 (patch) | |
tree | 7682dd0bb50a33c8db4d23a5008527a878e90b44 /spec/bundler/install | |
parent | e1026000afe02b57a765c40151641d480fc34e05 (diff) |
[rubygems/rubygems] Clear generated files recursively
On macOS, `dsymutil` utility splits debug info into .dSYM directory.
Glob list of `.bundle/cache/extensions/**/*binary_c*` includes that
directory but `FileUtils.rm` fails to unlink a directory.
https://github.com/ruby/ruby/actions/runs/8149918901/job/22275331688#step:11:3000
```
Operation not permitted @ apply2files - /Users/runner/work/ruby/ruby/src/tmp/2/home/.bundle/cache/extensions/arm64-darwin-22/ruby/3.4.0+0/3b02a1011c53518f911ab3a9e8c6c608/very_simple_binary-1.0/very_simple_binary_c.bundle.dSYM
# ./lib/fileutils.rb:2332:in 'File.unlink'
# ./lib/fileutils.rb:2332:in 'block in FileUtils::Entry_#remove_file'
# ./lib/fileutils.rb:2337:in 'FileUtils::Entry_#platform_support'
# ./lib/fileutils.rb:2331:in 'FileUtils::Entry_#remove_file'
# ./lib/fileutils.rb:1475:in 'FileUtils.remove_file'
# ./lib/fileutils.rb:1223:in 'block in FileUtils.rm'
# ./lib/fileutils.rb:1222:in 'FileUtils.rm'
# ./spec/bundler/install/global_cache_spec.rb:235:in 'block (3 levels) in <top (required)>'
```
https://github.com/rubygems/rubygems/commit/375c127684
Diffstat (limited to 'spec/bundler/install')
-rw-r--r-- | spec/bundler/install/global_cache_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/bundler/install/global_cache_spec.rb b/spec/bundler/install/global_cache_spec.rb index f482812f52..0da4de05b2 100644 --- a/spec/bundler/install/global_cache_spec.rb +++ b/spec/bundler/install/global_cache_spec.rb @@ -232,7 +232,7 @@ RSpec.describe "global gem caching" do R expect(out).to eq "VERY_SIMPLE_BINARY_IN_C\nVERY_SIMPLE_GIT_BINARY_IN_C" - FileUtils.rm Dir[home(".bundle", "cache", "extensions", "**", "*binary_c*")] + FileUtils.rm_rf Dir[home(".bundle", "cache", "extensions", "**", "*binary_c*")] gem_binary_cache.join("very_simple_binary_c.rb").open("w") {|f| f << "puts File.basename(__FILE__)" } git_binary_cache.join("very_simple_git_binary_c.rb").open("w") {|f| f << "puts File.basename(__FILE__)" } |