Add ability to disable GUI host errors (dotnet/core-setup#6325)
authorVitek Karas <vitek.karas@microsoft.com>
Tue, 7 May 2019 12:13:57 +0000 (05:13 -0700)
committerGitHub <noreply@github.com>
Tue, 7 May 2019 12:13:57 +0000 (05:13 -0700)
commit01d0d58c7b36b0b1ed0e40affcfed7db926c19ba
treedfc25a6db981b110e53b65635592909740e308ae
parentc84157503431bbc14af37a58443d7c3bfb374ca3
Add ability to disable GUI host errors (dotnet/core-setup#6325)

By default if the host runs a GUI application, it will report errors as a popup dialog. This is very useful for normal activation, but it is when executed from automation. The popup dialog blocks the process exit indefinitely.

This change adds environment variable `DOTNET_DISABLE_GUI_ERRORS`. If it's set to `1`, then even if the application is marked as GUI, all hosting errors will be reported to `stderr` and no UI popup will occur.

Commit migrated from https://github.com/dotnet/core-setup/commit/5f7f0e599520171508acb2b900d07ca5233a9155
src/installer/corehost/corehost.cpp
src/installer/test/HostActivationTests/Constants.cs
src/installer/test/HostActivationTests/StandaloneAppActivation.cs
src/installer/test/TestUtils/Command.cs