Tharga / Console

Tharga Toolkit Console is used to simplify construction of advanced console applications.
MIT License
23 stars 6 forks source link

command from start of console nerver excute #5

Closed windwp closed 8 years ago

windwp commented 8 years ago

My sub command "app1" don't run in start when I excute it from dos Example: C:\Users\longt>myconsole.exe runapp app1

windwp commented 8 years ago

I just found change this in Program.cs and sub command will excute

 var commandEngine = new CommandEngine(command);
 commandEngine.Run(new[] { string.Join(" ", args) });
poxet commented 8 years ago

This should work too.

var commandEngine = new CommandEngine(command);
commandEngine.Run(args);

Do you have to do "new[] { string.Join(" ", args) }", or it does not work?

windwp commented 8 years ago

Sorry my mistake, I forget to add quote in subcommand :) C:\Users\longt>myconsole.exe "runapp app1"