override fun processStarted()

in plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/agent/runner/CommandExecutionAdapter.kt [38:71]


    override fun processStarted(programCommandLine: String, workingDirectory: File) {
        if (!_commandLine.title.isNullOrBlank())
        {
            when (_loggingStrategy) {
                LoggingStrategy.Default -> {
                    _blockToken = _loggerService.writeBlock(_commandLine.title)
                }
                LoggingStrategy.HiddenInBuildLog -> {
                    writeStandardOutput(_commandLine.title)
                }
                LoggingStrategy.HiddenBlockInBuildLog -> {
                    _blockToken = _loggerService.writeTraceBlock(_commandLine.title)
                }
            }
        }

        var commandLine: CommandLine? = _commandLine
        while (commandLine != null) {
            val executableFilePresentation = _commandLinePresentationService.buildExecutablePresentation(commandLine.executableFile)
            val argsPresentation = _commandLinePresentationService.buildArgsPresentation(commandLine.arguments)

            var startingInfo =
                    listOf(StdOutText("Starting: ")) +
                            commandLine.description +
                            executableFilePresentation +
                            argsPresentation

            writeStandardOutput(*(startingInfo).toTypedArray())
            commandLine = commandLine.baseCommandLine
        }

        val virtualWorkingDirectory = _virtualContext.resolvePath(_commandLine.workingDirectory.path)
        writeStandardOutput(StdOutText("in directory: "), StdOutText(virtualWorkingDirectory))
    }