[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.
[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 ignoreexceptions 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 existentor not) are removed. However, due to this exception swallowing, this is
not always the case.
From the
rm
man pagehttps://github.com/ruby/fileutils/commit/fa65d676ec
Co-Authored-By: David RodrÃguez [email protected]