This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
fix: handle symlinks when creating directory #1640
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⏱ Benchmark resultsComparing with afaa4ef largeDepsEsbuild: 2.6s⬇️ 5.19% decrease vs. afaa4ef
Legend
largeDepsNft: 7.6s⬇️ 11.84% decrease vs. afaa4ef
Legend
largeDepsZisi: 15.3s⬇️ 6.28% decrease vs. afaa4ef
Legend
|
eduardoboucas
commented
Nov 1, 2023
// `symlinks` map, which we'll later use to create the symlinks in the | ||
// target directory. We can't do that right now because the target path | ||
// may not have been copied over yet. | ||
if (stat.isSymbolicLink()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably do the same in createZipArchive
, but starting with createDirectory
for now.
@ascorbic what happened when you tried to deploy the function to production?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the test, it works: 07061e0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it worked fine in builds
Skn0tt
approved these changes
Nov 2, 2023
Skn0tt
pushed a commit
to netlify/build
that referenced
this pull request
May 21, 2024
…-it#1640) * fix: handle symlinks when creating directory * chore: add test * chore: skip test on Windows
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When creating a bundle into a directory, we need to respect symlinks and not just copy them as files.
Fixes netlify/cli#6106