Commit 1a95084
fix: avoid glob expansion errors when no node versions installed
Fixes #3727
When no node versions are installed, would produce errors like:
`find: /path/.nvm/versions/node/*: No such file or directory`
This happened because bash expands `*` literally when nullglob is not
set and the directory is empty.
Solution:
- Build find arguments dynamically without shell glob expansion
- Use `find DIR -mindepth 1 -maxdepth 1` instead of `find DIR/*`
- Suppress stderr from find to handle edge cases gracefully
- Deduplicate directories before passing to find1 parent 630a01f commit 1a95084
1 file changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1532 | 1532 | | |
1533 | 1533 | | |
1534 | 1534 | | |
1535 | | - | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
1536 | 1551 | | |
1537 | 1552 | | |
1538 | 1553 | | |
| |||
0 commit comments