nowsecure / node-applesign

NodeJS module and commandline utility for re-signing iOS applications (IPA files).
https://www.nowsecure.com
MIT License
425 stars 77 forks source link

Fix related to bug https://github.com/nowsecure/node-applesign/issues/89 #90

Closed C3l1n closed 5 years ago

trufae commented 5 years ago

I am not a big fan of ignoring errors, and eexist shouldnt be raised with mkdir when the recursive option is set. I did a bunch of tests about this. So my guess is that the error could be related to a change in the behaviour between versions of nodejs.

Which version are u using? Im on 10.15.1

On 26 Oct 2019, at 11:08, Karol Jerzy Celiński notifications@github.com wrote:

 You can view, comment on, or merge this pull request online at:

https://github.com/nowsecure/node-applesign/pull/90

Commit Summary

Fix related to bug https://github.com/nowsecure/node-applesign/issues/89 File Changes

M lib/tools.js (5) Patch Links:

https://github.com/nowsecure/node-applesign/pull/90.patch https://github.com/nowsecure/node-applesign/pull/90.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

trufae commented 5 years ago

Confirmed, the issue is because you are using a very old version of NodeJS. i will just update the minimum dependency of node to the last LTS (12)

$ cd node-v8.16.2-darwin-x64/
$ cd bin/
$ ./node
> const fs = require("fs")
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
Error: EEXIST: file already exists, mkdir 'foo'
    at Object.fs.mkdirSync (fs.js:885:18)
>

vs node10

$ node
> const fs = require("fs")
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> $ node -v
v10.15.1
$
C3l1n commented 5 years ago

Confirmed, the issue is because you are using a very old version of NodeJS. i will just update the minimum dependency of node to the last LTS (12)

$ cd node-v8.16.2-darwin-x64/
$ cd bin/
$ ./node
> const fs = require("fs")
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
Error: EEXIST: file already exists, mkdir 'foo'
    at Object.fs.mkdirSync (fs.js:885:18)
>

vs node10

$ node
> const fs = require("fs")
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> fs.mkdirSync("foo", {recursive:true})
undefined
> $ node -v
v10.15.1
$

Sorry I've been busy for the last few days. It's true I have real old node on thix machine it's 8.11. Thanks for help.