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
|
@ -15,8 +15,8 @@ program
|
|||
return;
|
||||
}
|
||||
child.spawn(
|
||||
"vi",
|
||||
[Helper.resolveHomePath("users", name, "user.json")],
|
||||
process.env.EDITOR || "vi",
|
||||
[require("path").join(Helper.HOME, "users", name, "user.json")],
|
||||
{stdio: "inherit"}
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue