fix: Remove configserver arg when parsing CLIOptions
This commit is contained in:
1 parent
c8d37c2dfc
commit
be8bc54e46
1 file changed
+16
-2
@@ -1,4 +1,4 @@
|
||||
namespace mbts.ui.shell {
|
||||
namespace mbts.ui.shell {
|
||||
using bts;
|
||||
using bts.utils;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
using mbts.ui.native;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
@@ -42,7 +43,20 @@
|
||||
#endif
|
||||
|
||||
public new int Run() {
|
||||
var argv = Environment.GetCommandLineArgs();
|
||||
var argv = Environment.GetCommandLineArgs().ToList();
|
||||
|
||||
// TODO: Add configserver arg to CLIOptions (for now, just strip it
|
||||
// out before parsing)
|
||||
for (int i = 0; i < argv.Count; i++) {
|
||||
if (argv[i].ToLower() == "-configserver") {
|
||||
argv.RemoveAt(i);
|
||||
if (i < argv.Count) {
|
||||
argv.RemoveAt(i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int exit_code = 1;
|
||||
Parser.Default.ParseArguments<CLIOptions>(argv).WithParsed(opts => {
|
||||
_opts = opts;
|
||||
|
||||
Reference in new issue
Block a user