* A folder's real path, for the include walk's cycle guard. The OS's realpath * is one call a folder, where the JS one stats every part of the path, which * made the walk the bulk of a `status` on a project that includes a large * ignored tree (#3086). Some volumes refuse the OS call where the JS
(dir: string)
| 770 | * the JS one answers there; throws only when both do. |
| 771 | */ |
| 772 | function walkRealpath(dir: string): string { |
| 773 | try { |
| 774 | return fs.realpathSync.native(dir); |
| 775 | } catch { |
| 776 | return fs.realpathSync(dir); |
| 777 | } |
| 778 | } |
| 779 | |
| 780 | /** |
| 781 | * Actively discover the source files an `include` whitelist forces in. `git |