Comparing version 0.0.6 to 0.0.7
@@ -12,2 +12,3 @@ | ||
var Octal = configDefs.Octal | ||
var mkdirp = require('mkdirp') | ||
@@ -178,2 +179,3 @@ exports.load = load | ||
this._saving ++ | ||
var mode = where === 'user' ? 0600 : 0666 | ||
@@ -183,10 +185,14 @@ if (!data.trim()) | ||
else { | ||
fs.writeFile(target.path, data, 'utf8', function (er) { | ||
mkdirp(path.dirname(target.path), function (er) { | ||
if (er) | ||
return then(er) | ||
if (where === 'user' && myUid && myGid) | ||
fs.chown(target.path, +myUid, +myGid, then) | ||
else | ||
then() | ||
}.bind(this)) | ||
fs.writeFile(target.path, data, 'utf8', function (er) { | ||
if (er) | ||
return then(er) | ||
if (where === 'user' && myUid && myGid) | ||
fs.chown(target.path, +myUid, +myGid, then) | ||
else | ||
then() | ||
}) | ||
}) | ||
} | ||
@@ -193,0 +199,0 @@ |
{ | ||
"name": "npmconf", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "The config thing npm uses", | ||
@@ -12,3 +12,4 @@ "main": "npmconf.js", | ||
"inherits": "~1.0.0", | ||
"once": "~1.1.1" | ||
"once": "~1.1.1", | ||
"mkdirp": "~0.3.3" | ||
}, | ||
@@ -15,0 +16,0 @@ "devDependencies": {}, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27745
821
5
+ Addedmkdirp@~0.3.3
+ Addedmkdirp@0.3.5(transitive)