mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 08:23:12 +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) {
|
async function getEditor(argsEditor) {
|
||||||
let editor = "";
|
/* eslint-disable */
|
||||||
if (argsEditor) {
|
return argsEditor || process.ENV.EDITOR || process.env.VISUAL || -1
|
||||||
editor = argsEditor;
|
/* eslint-enable */
|
||||||
/* eslint-disable */
|
// needed for the process.env statements to not be flagged by eslint
|
||||||
} else if (process.env.EDITOR) {
|
// prio for editors is CLI arg > env.EDITOR > env.VISUAL
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function configToKeyVal(data) {
|
async function configToKeyVal(data) {
|
||||||
|
|||||||
Reference in new issue
Block a user