bugfix - argless commands shouldn't crash
This commit is contained in:
parent
146a4e006d
commit
263f8ab040
@ -36,7 +36,10 @@ namespace directors_assistant
|
||||
|
||||
var cmdAndArgs = cmd.shell.Split(' ');
|
||||
var justArgs = cmdAndArgs.Skip(1).ToList();
|
||||
justArgs.AddRange(ec.args);
|
||||
if(ec.args?.Count > 0)
|
||||
{
|
||||
justArgs.AddRange(ec.args);
|
||||
}
|
||||
var commandPath = cmdAndArgs[0];
|
||||
var commandArguments = String.Join(' ', justArgs);
|
||||
if (ec.timeout != null && ec.timeout > TimeSpan.Zero)
|
||||
|
Loading…
Reference in New Issue
Block a user