{"action":"opened","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/1442","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1442/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1442/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/1442/events","html_url":"https://github.com/yarnpkg/yarn/issues/1442","id":185143266,"number":1442,"title":"pack doesn't work with files in directories","user":{"login":"t-obi","id":1761818,"avatar_url":"https://avatars.githubusercontent.com/u/1761818?v=3","gravatar_id":"","url":"https://api.github.com/users/t-obi","html_url":"https://github.com/t-obi","followers_url":"https://api.github.com/users/t-obi/followers","following_url":"https://api.github.com/users/t-obi/following{/other_user}","gists_url":"https://api.github.com/users/t-obi/gists{/gist_id}","starred_url":"https://api.github.com/users/t-obi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-obi/subscriptions","organizations_url":"https://api.github.com/users/t-obi/orgs","repos_url":"https://api.github.com/users/t-obi/repos","events_url":"https://api.github.com/users/t-obi/events{/privacy}","received_events_url":"https://api.github.com/users/t-obi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-25T14:59:27Z","updated_at":"2016-10-25T14:59:27Z","closed_at":null,"body":"<!-- *Before creating an issue please make sure you are using the latest version of yarn.* -->\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\nBug\r\n\r\n**What is the current behavior?**\r\nWhile working on a PR for #755 I found a weird behaviour with yarn pack.\r\nBasically whenever the package has a nonempty file in a directory the produced archive will be corrupt.\r\nIt 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. \r\n\r\n**If the current behavior is a bug, please provide the steps to reproduce.**\r\nI have actually found this by writing some tests for this and will add a PR with the failing tests.\r\n\r\nTo reproduce this manually:\r\nCreate 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.\r\nThen run yarn pack and extract the archive - everything should be fine so far.\r\n\r\nMove index.js in a directory.\r\nRun yarn pack and extract again - this should fail because the archive is corrupted.\r\n\r\nFor comparison you can use npm pack, this should work in both cases.\r\n\r\n**What is the expected behavior?**\r\nIt should be possible to pack and publish a package with files in directories.\r\n\r\n**Please mention your node.js, yarn and operating system version.**\r\nI have tested this with node 6.2.1 and 6.9.1, yarn 0.15.1 and current master, osx 10.12"}}
{"actor":{"display_login":"t-obi"}}