mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 15:33:12 +09:00
Use factory pattern for yargs
The ESM import of yargs does not support the singleton way of using yargs, instead we have to call the yargs function to get a parser that can be augmented with the options. The .argv property has also been deprecated. Replace it with a call to .parse() instead.
This commit is contained in:
1 parent
7987a5d925
commit
d6dce12acc
4 files changed
+8
-8
No files matched your search
@@ -82,7 +82,7 @@ export class HostConnector extends lib.WebSocketClientConnector {
|
||||
async function startHost() {
|
||||
// argument parsing
|
||||
// eslint-disable-next-line node/no-sync
|
||||
const args = yargs
|
||||
const args = yargs(process.argv.slice(2))
|
||||
.scriptName("host")
|
||||
.usage("$0 <command> [options]")
|
||||
.option("log-level", {
|
||||
|
||||
Reference in new issue
Block a user