{"action":"created","issue":{"url":"https://api.github.com/repos/npm/node-tar/issues/169","repository_url":"https://api.github.com/repos/npm/node-tar","labels_url":"https://api.github.com/repos/npm/node-tar/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/npm/node-tar/issues/169/comments","events_url":"https://api.github.com/repos/npm/node-tar/issues/169/events","html_url":"https://github.com/npm/node-tar/pull/169","id":290918576,"number":169,"title":"unpack: don't unpend if an error occurred","user":{"login":"al-k21","id":29542357,"avatar_url":"https://avatars1.githubusercontent.com/u/29542357?v=4","gravatar_id":"","url":"https://api.github.com/users/al-k21","html_url":"https://github.com/al-k21","followers_url":"https://api.github.com/users/al-k21/followers","following_url":"https://api.github.com/users/al-k21/following{/other_user}","gists_url":"https://api.github.com/users/al-k21/gists{/gist_id}","starred_url":"https://api.github.com/users/al-k21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/al-k21/subscriptions","organizations_url":"https://api.github.com/users/al-k21/orgs","repos_url":"https://api.github.com/users/al-k21/repos","events_url":"https://api.github.com/users/al-k21/events{/privacy}","received_events_url":"https://api.github.com/users/al-k21/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-01-23T17:06:48Z","updated_at":"2018-02-01T04:24:21Z","closed_at":"2018-02-01T04:22:56Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/npm/node-tar/pulls/169","html_url":"https://github.com/npm/node-tar/pull/169","diff_url":"https://github.com/npm/node-tar/pull/169.diff","patch_url":"https://github.com/npm/node-tar/pull/169.patch"},"body":"fs.futimes is not implemented on AIX, this causes an error. For some\r\nreason the this.warn() at\r\nhttps://github.com/npm/node-tar/blob/51b6e83761dedcce661404819571779cefd35d04/lib/unpack.js#L204\r\ndoesn't show up, and the `this[UNPEND]()` causes `this[PENDING]` to go\r\nnegative.\r\n\r\nSince the PENDING check doesn't cover negative values, the stream never closes.\r\n\r\nThis means that a simple test-case:\r\n\r\n```js\r\nconst tar = require('tar')\r\ntar.extract({ file: 'express-4.16.2.tar'})\r\n  .then(x => { console.log(x, 'done'); },\r\n        x => { console.log(x, 'failed'); })\r\n```\r\n\r\nreturns without logging success or error when the `fs.futimes()` call\r\nfails.\r\n\r\ncc/ @gibfahn\r\n\r\nRefs: https://nodejs.org/dist/latest/docs/api/fs.html#fs_fs_futimes_fd_atime_mtime_callback\r\nRefs: https://github.com/npm/node-tar/issues/164\r\nRefs: https://github.com/nodejs/citgm/issues/525"},"comment":{"url":"https://api.github.com/repos/npm/node-tar/issues/comments/362154588","html_url":"https://github.com/npm/node-tar/pull/169#issuecomment-362154588","issue_url":"https://api.github.com/repos/npm/node-tar/issues/169","id":362154588,"user":{"login":"isaacs","id":9287,"avatar_url":"https://avatars2.githubusercontent.com/u/9287?v=4","gravatar_id":"","url":"https://api.github.com/users/isaacs","html_url":"https://github.com/isaacs","followers_url":"https://api.github.com/users/isaacs/followers","following_url":"https://api.github.com/users/isaacs/following{/other_user}","gists_url":"https://api.github.com/users/isaacs/gists{/gist_id}","starred_url":"https://api.github.com/users/isaacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaacs/subscriptions","organizations_url":"https://api.github.com/users/isaacs/orgs","repos_url":"https://api.github.com/users/isaacs/repos","events_url":"https://api.github.com/users/isaacs/events{/privacy}","received_events_url":"https://api.github.com/users/isaacs/received_events","type":"User","site_admin":false},"created_at":"2018-02-01T04:24:21Z","updated_at":"2018-02-01T04:24:21Z","author_association":"OWNER","body":"Fix landed in 4.3.1.\r\n\r\nIt'll still _warn_ on AIX, and fail if `strict:true` is set.  The best practice there is to set `mtime:false` to not even bother trying to set the mtime.  Falling back from `futimes` to `utimes` might be another option."}}
{"actor":{"display_login":"isaacs"}}