Fix --no-download-headless conflict in installer

Fix installer incorrectly exiting with a conflicting options errors when
the --no-download-headless option was used in conjunction with the
--factorio-dir option.
This commit is contained in:
Hornwitser committed 2024-01-21 23:49:19 +01:00
1 parent 2872faab98
commit e0161114e7
2 files changed
+6 -2

No files matched your search

+1
View File
@@ -11,6 +11,7 @@
- Fixed generated systemd file for clusteriohost not enabling source maps.
- Fixed ctl not exporting types used for adding commands to ctl plugins.
- Fixed controller only plugins throwing an error about missing a config field on startup out when added to hosts.
- Fixed installer incorrectly claiming the options --factorio-dir and --no-download-headless conflicts with each other.
## Version 2.0.0-alpha.14
+5 -2
View File
@@ -612,7 +612,7 @@ async function inquirerMissingArgs(args) {
},
], answers);
if (answers.downloadHeadless) {
if (!answers.factorioDir && answers.downloadHeadless) {
answers.factorioDir = "factorio";
}
}
@@ -760,7 +760,7 @@ async function main() {
"Can be set to false using --no-download-headless.",
type: "boolean",
})
.conflicts("factorio-dir", "download-headless");
;
}
args = args.argv;
@@ -780,6 +780,9 @@ async function main() {
let answers = await inquirerMissingArgs(args);
if (answers.downloadHeadless) {
if (answers.factorioDir !== "factorio") {
throw new InstallError("--download-headless option requires --factorio-dir to be set to factorio");
}
await downloadLinuxServer();
}