Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Engine/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class Helper

private CommandInvocationIntrinsics invokeCommand;
private IOutputWriter outputWriter;
private Object getCommandLock = new object();

#endregion

Expand Down Expand Up @@ -567,7 +568,10 @@ public bool PositionalParameterUsed(CommandAst cmdAst, bool moreThanThreePositio
/// <returns></returns>
public CommandInfo GetCommandInfo(string name, CommandTypes commandType = CommandTypes.Alias | CommandTypes.Cmdlet | CommandTypes.Configuration | CommandTypes.ExternalScript | CommandTypes.Filter | CommandTypes.Function | CommandTypes.Script | CommandTypes.Workflow)
{
return this.invokeCommand.GetCommand(name, commandType);
lock (getCommandLock)
{
return this.invokeCommand.GetCommand(name, commandType);
}
}

/// <summary>
Expand Down