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 cmdAndArgs = cmd.shell.Split(' ');
|
||||||
var justArgs = cmdAndArgs.Skip(1).ToList();
|
var justArgs = cmdAndArgs.Skip(1).ToList();
|
||||||
|
if(ec.args?.Count > 0)
|
||||||
|
{
|
||||||
justArgs.AddRange(ec.args);
|
justArgs.AddRange(ec.args);
|
||||||
|
}
|
||||||
var commandPath = cmdAndArgs[0];
|
var commandPath = cmdAndArgs[0];
|
||||||
var commandArguments = String.Join(' ', justArgs);
|
var commandArguments = String.Join(' ', justArgs);
|
||||||
if (ec.timeout != null && ec.timeout > TimeSpan.Zero)
|
if (ec.timeout != null && ec.timeout > TimeSpan.Zero)
|
||||||
|
Loading…
Reference in New Issue
Block a user