mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 20:43:08 +00:00
Fix missing Helper method in edit and use $EDITOR
* Fix the missing Helper method in the edit command to use Helper.HOME and the correct path assembly method (path.join) instead of joining strings together! * Use $EDITOR instead of "vi" in the event a user doesn't have "vi" installed or doesn't understand it. Fallback to "vi" in case user doesn't have $EDITOR set.
This commit is contained in:
parent
06517e7dac
commit
a6aa40b1c1
1 changed files with 2 additions and 2 deletions
|
@ -15,8 +15,8 @@ program
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
child.spawn(
|
child.spawn(
|
||||||
"vi",
|
process.env.EDITOR || "vi",
|
||||||
[Helper.resolveHomePath("users", name, "user.json")],
|
[require("path").join(Helper.HOME, "users", name, "user.json")],
|
||||||
{stdio: "inherit"}
|
{stdio: "inherit"}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue