Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pack doesn't work with files in directories #1442

Open
tkloht opened this issue Oct 25, 2016 · 1 comment
Open

pack doesn't work with files in directories #1442

tkloht opened this issue Oct 25, 2016 · 1 comment

Comments

@tkloht
Copy link
Contributor

tkloht commented Oct 25, 2016

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
While working on a PR for #755 I found a weird behaviour with yarn pack.
Basically whenever the package has a nonempty file in a directory the produced archive will be corrupt.
It still seems unlikely that this is really bug and not some error on my part because this should happen with pretty much every package , but I have tried all kinds of stuff and can't see what I might be doing wrong.

If the current behavior is a bug, please provide the steps to reproduce.
I have actually found this by writing some tests for this and will add a PR with the failing tests.

To reproduce this manually:
Create a minimal example, for example just index.js. Add some code to index.js because this will only work if the file is not empty.
Then run yarn pack and extract the archive - everything should be fine so far.

Move index.js in a directory.
Run yarn pack and extract again - this should fail because the archive is corrupted.

For comparison you can use npm pack, this should work in both cases.

What is the expected behavior?
It should be possible to pack and publish a package with files in directories.

Please mention your node.js, yarn and operating system version.
I have tested this with node 6.2.1 and 6.9.1, yarn 0.15.1 and current master, osx 10.12

@torifat
Copy link
Member

torifat commented Nov 29, 2016

Couldn't reproduce this with the current master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants