bugfix - argless commands shouldn't crash

This commit is contained in:
Adam R. Grey 2021-12-18 03:37:43 -05:00
parent 146a4e006d
commit 263f8ab040

View File

@ -36,7 +36,10 @@ namespace directors_assistant
var cmdAndArgs = cmd.shell.Split(' ');
var justArgs = cmdAndArgs.Skip(1).ToList();
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)