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