Merge pull request #436 from jake-87/patch-1

Wrong capitalisation on `process.env`
This commit is contained in:
Arvids Godjuks authored and GitHub committed 2021-12-09 01:04:43 +02:00
commit 072e95046a
1 file changed
+4 -4
+4 -4
View File
@@ -38,7 +38,7 @@ function print(...content) {
async function getEditor(argsEditor) {
// eslint-disable-next-line
return argsEditor || process.ENV.EDITOR || process.env.VISUAL || -1
return argsEditor || process.env.EDITOR || process.env.VISUAL || -1
// needed for the process.env statements to not be flagged by eslint
// priority for editors is CLI argument > env.EDITOR > env.VISUAL
}
@@ -68,7 +68,7 @@ async function configToKeyVal(data) {
return final;
}
async function serializedConfigToString(serlializedConfig, configGroup, disallowedList) {
async function serializedConfigToString(serializedConfig, configGroup, disallowedList) {
let allConfigElements = "";
for (let group of serializedConfig.groups) {
for (let [name, value] of Object.entries(group.fields)) {
@@ -176,7 +176,7 @@ masterConfigCommands.add(new libCommand.Command({
throw new libErrors.CommandError(`No editor avalible. Checked CLI input, EDITOR and VISUAL env vars
Try "ctl master config edit <editor of choice>"`);
}
let allConfigElements = await serializedConfigToString(respose.serialized_config, libConfig.MasterConfig, {});
let allConfigElements = await serializedConfigToString(response.serialized_config, libConfig.MasterConfig, {});
await fs.writeFile(tmpFile, allConfigElements, (err) => {
if (err) {
throw err;
@@ -437,7 +437,7 @@ instanceConfigCommands.add(new libCommand.Command({
}
let disallowedList = {"instance.id": 0, "instance.assigned_slave": 0, "factorio.settings": 0};
let allConfigElements = await serializedConfigToString(
respose.serialized_config,
response.serialized_config,
libConfig.InstanceConfig,
disallowedList
);