Skip to content

Commit 983180b

Browse files
committed
fix #246: remove any double quotes or single quotes from os.tmpdir
1 parent c7028f2 commit 983180b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/tmp.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,11 @@ function setGracefulCleanup() {
637637
* @returns {string} the currently configured tmp dir
638638
*/
639639
function _getTmpDir() {
640-
return path.resolve(os.tmpdir());
640+
let tmpdir = os.tmpdir();
641+
if (!_isBlank(tmpdir)) {
642+
tmpdir = tmpdir.replace(/["']/g, '');
643+
}
644+
return path.resolve(tmpdir);
641645
}
642646

643647
// Install process exit listener

0 commit comments

Comments
 (0)