mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
Minified getEditor function.
This commit is contained in:
1 file changed
+5
-15
+5
-15
@@ -37,21 +37,11 @@ function print(...content) {
|
||||
}
|
||||
|
||||
async function getEditor(argsEditor) {
|
||||
let editor = "";
|
||||
if (argsEditor) {
|
||||
editor = argsEditor;
|
||||
/* eslint-disable */
|
||||
} else if (process.env.EDITOR) {
|
||||
editor = process.env.EDITOR;
|
||||
} else if (process.env.VISUAL) {
|
||||
editor = process.env.VISUAL
|
||||
/* eslint-enable */
|
||||
// needed for the process.env statements to not be flagged by eslint
|
||||
// prio for editors is CLI arg > env.EDITOR > env.VISUAL
|
||||
} else {
|
||||
editor = -1;
|
||||
}
|
||||
return editor;
|
||||
/* eslint-disable */
|
||||
return argsEditor || process.ENV.EDITOR || process.env.VISUAL || -1
|
||||
/* eslint-enable */
|
||||
// needed for the process.env statements to not be flagged by eslint
|
||||
// prio for editors is CLI arg > env.EDITOR > env.VISUAL
|
||||
}
|
||||
|
||||
async function configToKeyVal(data) {
|
||||
|
||||
Reference in new issue
Block a user