From a7be90b6f89ea55c41f323fb87075c54e644dc18 Mon Sep 17 00:00:00 2001 From: Thomas Schouten Date: Sat, 9 Nov 2024 17:03:43 +0100 Subject: [PATCH] Fix default Docker image name when running Dockerized TeX Live without a project SDK --- CHANGELOG.md | 1 + src/nl/hannahsten/texifyidea/run/compiler/LatexCompiler.kt | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81a645507..93e980741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added ### Fixed +* Fix default Docker image name when running Dockerized TeX Live without a project SDK ## [0.9.8] diff --git a/src/nl/hannahsten/texifyidea/run/compiler/LatexCompiler.kt b/src/nl/hannahsten/texifyidea/run/compiler/LatexCompiler.kt index f51032d8a..02de9d144 100644 --- a/src/nl/hannahsten/texifyidea/run/compiler/LatexCompiler.kt +++ b/src/nl/hannahsten/texifyidea/run/compiler/LatexCompiler.kt @@ -373,7 +373,7 @@ enum class LatexCompiler(private val displayName: String, val executableName: St @Suppress("SameParameterValue") private fun createDockerCommand(runConfig: LatexRunConfiguration, dockerAuxilDir: String?, dockerOutputDir: String?, mainFile: VirtualFile, command: MutableList) { - val isMiktex = runConfig.getLatexDistributionType() == LatexDistributionType.MIKTEX + val isMiktex = runConfig.getLatexDistributionType() == LatexDistributionType.DOCKER_MIKTEX if (isMiktex) { // See https://hub.docker.com/r/miktex/miktex @@ -420,7 +420,9 @@ enum class LatexCompiler(private val displayName: String, val executableName: St } } - parameterList.add((sdk?.sdkAdditionalData as? DockerSdkAdditionalData)?.imageName ?: "miktex:latest") + val sdkImage = (sdk?.sdkAdditionalData as? DockerSdkAdditionalData)?.imageName + val default = if (isMiktex) "miktex/miktex:latest" else "texlive/texlive:latest" + parameterList.add(sdkImage ?: default) command.addAll(0, parameterList) }