Merge pull request #143 from xPaw/fix-crash
Fix crash and remove remaining 0777 mode
This commit is contained in:
commit
05cd5ac4a5
@ -102,20 +102,14 @@ ClientManager.prototype.updateUser = function(name, opts) {
|
||||
try {
|
||||
user = this.readUserConfig(name);
|
||||
_.merge(user, opts);
|
||||
fs.writeFileSync(
|
||||
path,
|
||||
JSON.stringify(user, null, " ")
|
||||
);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return;
|
||||
}
|
||||
|
||||
fs.writeFileSync(
|
||||
path,
|
||||
JSON.stringify(user, null, " "),
|
||||
function(err) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
);
|
||||
return true;
|
||||
};
|
||||
|
||||
|
@ -30,8 +30,7 @@ program
|
||||
user.password = hash;
|
||||
fs.writeFileSync(
|
||||
file,
|
||||
JSON.stringify(user, null, " "),
|
||||
{mode: "0777"}
|
||||
JSON.stringify(user, null, " ")
|
||||
);
|
||||
console.log("Successfully reset password for '" + name + "'.");
|
||||
console.log("");
|
||||
|
Loading…
Reference in New Issue
Block a user