fix: Skip 1st arg (exe-path) when parsing cmd line
This only applies to Spark.exe, where the args are obtained via Environment.GetCommandLineArgs, rather than directly from a 'main' fn. The former prepends the [Spark] exe path to the argv array from 'main', which the CommandLine parser does not expect.
This commit is contained in:
1 parent
5368f25ed8
commit
23c83c0fb6
1 file changed
+1
-1
@@ -44,7 +44,7 @@ namespace mbts.ui.shell {
|
||||
#endif
|
||||
|
||||
public new int Run() {
|
||||
var argv = SparkCmdOpts.conform_opts(Environment.GetCommandLineArgs());
|
||||
var argv = SparkCmdOpts.conform_opts(Environment.GetCommandLineArgs().Skip(1));
|
||||
|
||||
int exit_code = 1;
|
||||
Parser.Default.ParseArguments<SparkCmdOpts>(argv).WithParsed(opts => {
|
||||
|
||||
Reference in new issue
Block a user