Skip to content

Commit

Permalink
Use GetType().Name to get the real name of the backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gardner authored and Chris Gardner committed Sep 8, 2018
1 parent 22c42bd commit b41e395
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PoshBot/Classes/CommandExecutor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ class CommandExecutor : BaseLogger {

# Kick off job and add to job tracker
$cmdExecContext.IsJob = $true
$cmdExecContext.Job = $cmdExecContext.Command.Invoke($cmdExecContext.ParsedCommand, $true,$this._bot.Backend.Name)
$cmdExecContext.Job = $cmdExecContext.Command.Invoke($cmdExecContext.ParsedCommand, $true,$this._bot.Backend.GetType().Name)
$this.LogDebug("Command [$($cmdExecContext.FullyQualifiedCommandName)] executing in job [$($cmdExecContext.Job.Id)]")
$cmdExecContext.Complete = $false
} else {
# Run command in current session and get results
# This should only be 'builtin' commands
try {
$cmdExecContext.IsJob = $false
$hash = $cmdExecContext.Command.Invoke($cmdExecContext.ParsedCommand, $false,$this._bot.Backend.Name)
$hash = $cmdExecContext.Command.Invoke($cmdExecContext.ParsedCommand, $false,$this._bot.Backend.GetType().Name)
$cmdExecContext.Complete = $true
$cmdExecContext.Ended = (Get-Date).ToUniversalTime()
$cmdExecContext.Result.Errors = $hash.Error
Expand Down

0 comments on commit b41e395

Please sign in to comment.