Skip to content
This repository was archived by the owner on Jul 15, 2026. It is now read-only.

Add symlink support - #3

Open
Benjamin Weggersen (bweggersen) wants to merge 2 commits into
microsoft:masterfrom
bweggersen:bewegger/add-symlink-support
Open

Add symlink support#3
Benjamin Weggersen (bweggersen) wants to merge 2 commits into
microsoft:masterfrom
bweggersen:bewegger/add-symlink-support

Conversation

@bweggersen

Copy link
Copy Markdown
Member
  • nodir: true in globOptions allows glob to include symlinks in the return list, as they are treated as directories.
  • Then, to not explode the .tgz file, I've set noDirRecurse: true, which means node-tar will only include the files explicitly referenced in the files list. Directories (i.e. symlinks) will then only be included as empty directories. The files list includes a complete list of all the files to be archived, so this option shouldn't create any regressions.
  • Finally, I've set preservePaths: true to output symlinks correctly on tar.extract.

@dylan-smith

Copy link
Copy Markdown
Contributor

Benjamin Weggersen (@bweggersen) I wanted to acknowledge that I saw your PR, but unfortunately it may be a bit before I can get to it (I want to add tests to this code base too before I add/accept new features).

@bweggersen

Copy link
Copy Markdown
Member Author

@markjm

Copy link
Copy Markdown

Benjamin Weggersen (@bweggersen) , to confirm, this will include all files in globs specified like dir/**, but if dir/* contains a further directory, it will not recurse further than that?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants