-
-
Notifications
You must be signed in to change notification settings - Fork 77
Include UID in temp dir name. #277
Conversation
lib/utils.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe defaults is not available here. How about making the default tempDir in index.js contain the uid? Then we won't have to change this file or the clear function at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the default tempDir was /tmp on POSIX. We can't change that name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The defaults object is part of this plugin: https://github.com/lkmorlan/gulp-ruby-sass/blob/master/index.js#L22-L27. Maybe something like:
var uid = typeof process.getuid === 'function' ? process.getuid() : '';
var defaults = {
tempDir: osTmpdir() + uid,
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, osTmpdir() would normally be "/tmp", it would have to be:
osTmpdir() + '/' + uidThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True true. Go for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern is that we don't ask people to pass extra arguments to the clear cache function. Although that shouldn't be used often.
Also be sure to check tests when you're done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, please use path.join instead of +.
|
I have made another commit which I think fixes the identified issues. Note that it changes the meaning of the tempDir configuration because gulp-ruby-sass will no longer be added to the end. |
|
Love it. Thanks! |
Include UID in temp dir name.
|
I'll ping this PR when I publish a new version. |
|
Thanks! |
|
any chance of getting a build with this any time soon? |
|
Publishing now, should be up in a minute. |
This addresses #276.