mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 08:23:12 +09:00
Merge pull request #436 from jake-87/patch-1
Wrong capitalisation on `process.env`
This commit is contained in:
1 file changed
+4
-4
+4
-4
@@ -38,7 +38,7 @@ function print(...content) {
|
|||||||
|
|
||||||
async function getEditor(argsEditor) {
|
async function getEditor(argsEditor) {
|
||||||
// eslint-disable-next-line
|
// 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
|
// needed for the process.env statements to not be flagged by eslint
|
||||||
// priority for editors is CLI argument > env.EDITOR > env.VISUAL
|
// priority for editors is CLI argument > env.EDITOR > env.VISUAL
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ async function configToKeyVal(data) {
|
|||||||
return final;
|
return final;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function serializedConfigToString(serlializedConfig, configGroup, disallowedList) {
|
async function serializedConfigToString(serializedConfig, configGroup, disallowedList) {
|
||||||
let allConfigElements = "";
|
let allConfigElements = "";
|
||||||
for (let group of serializedConfig.groups) {
|
for (let group of serializedConfig.groups) {
|
||||||
for (let [name, value] of Object.entries(group.fields)) {
|
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
|
throw new libErrors.CommandError(`No editor avalible. Checked CLI input, EDITOR and VISUAL env vars
|
||||||
Try "ctl master config edit <editor of choice>"`);
|
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) => {
|
await fs.writeFile(tmpFile, allConfigElements, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
throw 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 disallowedList = {"instance.id": 0, "instance.assigned_slave": 0, "factorio.settings": 0};
|
||||||
let allConfigElements = await serializedConfigToString(
|
let allConfigElements = await serializedConfigToString(
|
||||||
respose.serialized_config,
|
response.serialized_config,
|
||||||
libConfig.InstanceConfig,
|
libConfig.InstanceConfig,
|
||||||
disallowedList
|
disallowedList
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user