Commit fa65d67
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.
Co-Authored-By: David Rodríguez <[email protected]>1 parent ec5d3b8 commit fa65d67
2 files changed
+31
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1165 | 1165 | | |
1166 | 1166 | | |
1167 | 1167 | | |
1168 | | - | |
| 1168 | + | |
1169 | 1169 | | |
1170 | 1170 | | |
1171 | 1171 | | |
| |||
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
1251 | | - | |
| 1251 | + | |
1252 | 1252 | | |
1253 | 1253 | | |
1254 | 1254 | | |
| |||
1315 | 1315 | | |
1316 | 1316 | | |
1317 | 1317 | | |
1318 | | - | |
| 1318 | + | |
1319 | 1319 | | |
1320 | 1320 | | |
1321 | 1321 | | |
| |||
1384 | 1384 | | |
1385 | 1385 | | |
1386 | 1386 | | |
| 1387 | + | |
1387 | 1388 | | |
1388 | 1389 | | |
1389 | 1390 | | |
1390 | 1391 | | |
| 1392 | + | |
1391 | 1393 | | |
1392 | 1394 | | |
1393 | 1395 | | |
| |||
1413 | 1415 | | |
1414 | 1416 | | |
1415 | 1417 | | |
1416 | | - | |
| 1418 | + | |
1417 | 1419 | | |
1418 | 1420 | | |
1419 | 1421 | | |
| |||
1423 | 1425 | | |
1424 | 1426 | | |
1425 | 1427 | | |
| 1428 | + | |
1426 | 1429 | | |
1427 | 1430 | | |
1428 | 1431 | | |
1429 | 1432 | | |
| 1433 | + | |
1430 | 1434 | | |
1431 | 1435 | | |
1432 | 1436 | | |
| |||
1437 | 1441 | | |
1438 | 1442 | | |
1439 | 1443 | | |
1440 | | - | |
| 1444 | + | |
1441 | 1445 | | |
1442 | 1446 | | |
1443 | 1447 | | |
1444 | 1448 | | |
1445 | 1449 | | |
1446 | 1450 | | |
1447 | 1451 | | |
| 1452 | + | |
1448 | 1453 | | |
1449 | 1454 | | |
1450 | 1455 | | |
| |||
1456 | 1461 | | |
1457 | 1462 | | |
1458 | 1463 | | |
1459 | | - | |
| 1464 | + | |
1460 | 1465 | | |
1461 | 1466 | | |
1462 | 1467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1814 | 1814 | | |
1815 | 1815 | | |
1816 | 1816 | | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
1817 | 1837 | | |
1818 | 1838 | | |
1819 | 1839 | | |
| |||
0 commit comments