Minified getEditor function.

This commit is contained in:
J87 authored and GitHub committed 2021-11-21 20:25:33 +11:00
1 parent 6d5d9ced47
commit 0bc6cf1178
1 file changed
+1 -11
+1 -11
View File
@@ -37,21 +37,11 @@ function print(...content) {
} }
async function getEditor(argsEditor) { async function getEditor(argsEditor) {
let editor = "";
if (argsEditor) {
editor = argsEditor;
/* eslint-disable */ /* eslint-disable */
} else if (process.env.EDITOR) { return argsEditor || process.ENV.EDITOR || process.env.VISUAL || -1
editor = process.env.EDITOR;
} else if (process.env.VISUAL) {
editor = process.env.VISUAL
/* eslint-enable */ /* eslint-enable */
// needed for the process.env statements to not be flagged by eslint // needed for the process.env statements to not be flagged by eslint
// prio for editors is CLI arg > env.EDITOR > env.VISUAL // prio for editors is CLI arg > env.EDITOR > env.VISUAL
} else {
editor = -1;
}
return editor;
} }
async function configToKeyVal(data) { async function configToKeyVal(data) {