Closed bluwy closed 2 years ago
The findAll function doesn't handle errors when fail to read a directory.
findAll
https://github.com/dominikg/tsconfck/blob/2b787ca14cd29b56c19b01f60854a282dd659571/src/find-all.ts#L25
Found this from https://github.com/vitejs/vite/issues/5765
npm init vite mkdir foo chmod 0 foo npm run dev
Vite initializes tsconfck in configResolved and calls findAll here:
configResolved
https://github.com/vitejs/vite/blob/cf59005a79dd7227f3ad63280761060ba224ce09/packages/vite/src/node/plugins/esbuild.ts#L296
System: OS: macOS 12.3.1 CPU: (8) arm64 Apple M1 Pro Memory: 498.75 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node Yarn: 1.22.15 - ~/.nvm/versions/node/v16.13.0/bin/yarn npm: 8.5.5 - ~/.nvm/versions/node/v16.13.0/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Browsers: Chrome: 99.0.4844.84 Firefox: 98.0.2 Safari: 15.4
Description
The
findAll
function doesn't handle errors when fail to read a directory.https://github.com/dominikg/tsconfck/blob/2b787ca14cd29b56c19b01f60854a282dd659571/src/find-all.ts#L25
Reproduction
Found this from https://github.com/vitejs/vite/issues/5765
Vite initializes tsconfck in
configResolved
and callsfindAll
here:https://github.com/vitejs/vite/blob/cf59005a79dd7227f3ad63280761060ba224ce09/packages/vite/src/node/plugins/esbuild.ts#L296
Additional Information