Skip to content

Commit

Permalink
fix #246: remove any double quotes or single quotes from os.tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
silkentrance committed Apr 8, 2020
1 parent c7028f2 commit 983180b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/tmp.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,11 @@ function setGracefulCleanup() {
* @returns {string} the currently configured tmp dir
*/
function _getTmpDir() {
return path.resolve(os.tmpdir());
let tmpdir = os.tmpdir();
if (!_isBlank(tmpdir)) {
tmpdir = tmpdir.replace(/["']/g, '');
}
return path.resolve(tmpdir);
}

// Install process exit listener
Expand Down

0 comments on commit 983180b

Please sign in to comment.