Commit Graph

5 Commits

Author SHA1 Message Date
Nathan Rajlich
a735527d8f [build-utils] Filter out files outside of cwd when glob is in "follow" mode (#9412)
Enables `glob()` to operate in "follow" mode, but filters out any values where a symlink points to a target that lives outside of the `cwd.
2023-02-11 20:42:39 +00:00
Nathan Rajlich
22d3ee160b [build-utils] Add includeDirectories option to glob() (#9245)
Instead of always including empty directories in `glob()`, make it an
opt-in behavior because technically it's a breaking change to include
them by default.
2023-01-17 19:21:40 -05:00
Ethan Arrowood
a008c9c7fe [build-utils] Support empty directory entries for glob() and download() (#9164)
Reopening #9103 since it was reverted.
2023-01-13 12:01:37 -08:00
Sean Massa
3a68c73496 [build-utils] Revert "Support empty directory entries for glob() and download()" (#9157)
Reverts vercel/vercel#9103

We believe the original PR is the cause of errors like:

> Error: EISDIR: illegal operation on a directory, read
2023-01-03 17:29:27 -05:00
Nathan Rajlich
99e40272cf [build-utils] Support empty directory entries for glob() and download() (#9103)
There are some edge-case situations where a dependency or build process is expecting an empty directory to exist, and this expectation would fail currently because `glob()` does not return directory entries.

So update `glob()` to return entries for empty directories, which are also re-created properly when passed to the `download()` function.
2022-12-21 20:06:14 +00:00