catch exceptions from ExtensionsAreaImpl#getExtensionPoint in ExecUtils

GitOrigin-RevId: a35d3d4a543cc0ba59f9bab4bbe30f8b6d6d488b
This commit is contained in:
Vladimir Kharitonov
2024-05-14 19:13:05 +02:00
committed by intellij-monorepo-bot
parent ba07987cc7
commit ba35b6fb80

View File

@@ -155,7 +155,10 @@ object ExecUtil {
val command = mutableListOf(commandLine.exePath)
command += commandLine.parametersList.list
val providedCommand = SudoCommandProvider.EXTENSION_POINT_NAME.extensionList.firstNotNullOfOrNull { it.sudoCommand(commandLine) }
val providedCommand = runCatching {
SudoCommandProvider.EXTENSION_POINT_NAME.extensionList.firstNotNullOfOrNull { it.sudoCommand(commandLine) }
}.getOrNull()
val sudoCommandLine = when {
providedCommand != null -> providedCommand
SystemInfoRt.isWindows -> {