1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/fileutils
Yusuke Endoh 983115cf3c [ruby/fileutils] FileUtils.rm* methods swallows only Errno::ENOENT when force is true
... instead of any StandardError.

To behave like the standard `rm` command, it should only ignore
exceptions about not existing files, not every exception. This should
make debugging some errors easier, because the expectation is that `rm
-rf` will succeed if and only if, all given files (previously existent
or not) are removed. However, due to this exception swallowing, this is
not always the case.

From the `rm` man page

> COMPATIBILITY
>
> The rm utility differs from historical implementations in that the -f
> option only masks attempts to remove non-existent files instead of
> masking a large variety of errors.

https://github.com/ruby/fileutils/commit/fa65d676ec

Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net>
2022-08-23 16:52:41 +09:00
..
clobber.rb Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
fileasserts.rb
test_dryrun.rb Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
test_fileutils.rb [ruby/fileutils] FileUtils.rm* methods swallows only Errno::ENOENT when force is true 2022-08-23 16:52:41 +09:00
test_nowrite.rb Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
test_verbose.rb Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00
visibility_tests.rb Avoid defining the same test class in multiple files 2022-04-22 15:00:16 -07:00