Skip to content

Commit

Permalink
fix gh-176: fail early if there is no tmp dir specified
Browse files Browse the repository at this point in the history
  • Loading branch information
silkentrance committed Oct 6, 2018
1 parent fcbf27b commit 335c579
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/tmp.js
Expand Up @@ -145,6 +145,9 @@ function _generateTmpName(opts) {
opts.postfix || ''
].join('');

if (!opts.dir && !tmpDir)
throw new Error("no tmp dir specified");

return path.join(opts.dir || tmpDir, name);
}

Expand Down

0 comments on commit 335c579

Please sign in to comment.