raszi / node-tmp

Temporary file and directory creator for node.js
MIT License
736 stars 92 forks source link

strict mode fail: Octal literals are not allowed #84

Closed huan closed 8 years ago

huan commented 8 years ago

please fix.

zixia:~/workspace (master) $ node --use-strict node_modules/tmp/lib/tmp.js                        
/home/ubuntu/workspace/node_modules/tmp/lib/tmp.js:167
    fs.open(name, _c.O_CREAT | _c.O_EXCL | _c.O_RDWR, opts.mode || 0600, function _fileCreated(err, fd) {
                                                                   ^^^^
SyntaxError: Octal literals are not allowed in strict mode.

there also another 0700.

change to this would fix:

parseInt('0600', 8)
raszi commented 8 years ago

Thanks for reporting it, I will fix it soon.

raszi commented 8 years ago

Actually we did this already, you're using an old version.