sync-exec icon indicating copy to clipboard operation
sync-exec copied to clipboard

Use mkdirSync in create-pipes

Open darkkelvin opened this issue 8 years ago • 0 comments

Replace mkdir with mkdirSync in create-pipes, so error thrown (e.g. on directory existed) would be properly caught. Currently on directory collision, the asynchronous mkdir's error would not be caught and sync-exec would erroneously assumed the directory to exist, which could result in various error such as hanging.

I know with execSync inherently in Node 0.12 the wise thing to do is probably to move onto that. But for various reasons I'm currently stuck with Node 0.10 and sync-exec is what I'm using to polyfill execSync. @gvarsanyi would you help review this PR?

darkkelvin avatar Jun 19 '17 10:06 darkkelvin