override fun makeProgramCommandLine()

in plugin-bazel-agent/src/main/kotlin/jetbrains/buildServer/bazel/BazelRunnerBuildService.kt [24:43]


    override fun makeProgramCommandLine(): ProgramCommandLine {
        val commandName = getCommandName()
        if (commandName.isNullOrEmpty()) {
            val buildException = RunBuildException("Bazel command name is empty")
            buildException.isLogStacktrace = false
            throw buildException
        }

        val command = _commandFactory.createCommand(commandName)

        // Register for shutdown only on build agent
        if (!runnerContext.isVirtualContext) {
            _shutdownMonitor.register(command)
        }

        if (BES_COMMANDS.contains(commandName)) {
            return _besCommandLineBuilder.build(command)
        }
        return _bazelCommandLineBuilder.build(command)
    }