mirror of
https://github.com/shelljs/shelljs.git
synced 2026-01-18 16:03:37 +00:00
Fix os.tmpdir bug
The checked method on `os` module was `tempDir` which was not existing on any version of Node (should have been `tmpDir`). With Node 0.10, the name became `tmpdir`.
This commit is contained in:
parent
a38ef4557e
commit
06f35f8a76
@ -37,7 +37,8 @@ function _tempDir() {
|
||||
if (state.tempDir)
|
||||
return state.tempDir; // from cache
|
||||
|
||||
state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+
|
||||
state.tempDir = writeableDir(os.tmpdir && os.tmpdir()) || // node 0.10+
|
||||
writeableDir(os.tmpDir && os.tmpDir()) || // node 0.8+
|
||||
writeableDir(process.env['TMPDIR']) ||
|
||||
writeableDir(process.env['TEMP']) ||
|
||||
writeableDir(process.env['TMP']) ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user