Closed FedericoBernal closed 4 years ago
@FedericoBernal, when running in PowerShell or remotely from ci/cd pipeline, use "--remote true" for dispatch create/refresh command. This is because dispatch allows std in (piped in output of another the old msbot cli to dispatch cli) -- this behavior is not compatible in powershell. You might still need $ErrorActionPreference to Continue if running from PowerShell.
I'll close this issue and let me know if you are still having issues with Dispatch with the workarounds. Thanks!
Thanks @tsuwandy for your quick reply. As you mentioned, we still need $ErrorActionPreference
to Continue
as it's executed from PowerShell after adding the --remote true
for the dispatch refresh command.
This issue is solved changing the ErrorActionPreference to Continue :blush:.
Tool
Name: botdispatch Version: 1.7.1 OS: Windows
Describe the bug
Dispatch refresh fails using $ErrorActionPreference set as Stop executed in PowerShell.
To Reproduce
Steps to reproduce the behavior:
$ErrorActionPreference = 'Stop'
dispatch refresh --version Dispatch --dispatch "<PATH_TO_DISPATCH_FILE>" --dataFolder "<PATH_TO_DISPATCH_FOLDER>" 2>> "<PATH_TO_LOG_FILE>" | Out-Null
Expected behavior
All the errors should be appended on the log file and the execution should be working successfully.
Additional context
See microsoft/botframework-solutions#3662
Changing the $ErrorActionPreference to Continue, the execution works.
[bug]