Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

Commit 5afc369

Browse files
author
Rob Wierzbowski
committed
Merge pull request #277 from lkmorlan/master
Include UID in temp dir name.
2 parents 3c59f89 + 1d65767 commit 5afc369

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ var replaceLocation = utils.replaceLocation;
2020
var createIntermediatePath = utils.createIntermediatePath;
2121

2222
var defaults = {
23-
tempDir: osTmpdir(),
23+
tempDir: path.join(osTmpdir(), 'gulp-ruby-sass'),
2424
verbose: false,
2525
sourcemap: false,
2626
emitCompileError: false
2727
};
2828

29+
if (typeof process.getuid === 'function') {
30+
defaults.tempDir += '-' + process.getuid();
31+
}
32+
2933
function gulpRubySass(sources, options) {
3034
var stream = new Readable({objectMode: true});
3135

@@ -215,7 +219,7 @@ gulpRubySass.logError = function (err) {
215219

216220
gulpRubySass.clearCache = function (tempDir) {
217221
tempDir = tempDir || defaults.tempDir;
218-
rimraf.sync(path.join(tempDir, 'gulp-ruby-sass'));
222+
rimraf.sync(tempDir);
219223
};
220224

221225
module.exports = gulpRubySass;

lib/utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ exports.emitErr = function (stream, err) {
1515
exports.createIntermediatePath = function (sources, matches, options) {
1616
return path.join(
1717
options.tempDir,
18-
'gulp-ruby-sass',
1918
md5Hex(
2019
process.cwd() +
2120
JSON.stringify(sources) +

0 commit comments

Comments
 (0)