Skip to content

Commit

Permalink
Merge pull request #3736 from Hannah-Sten/docker-texlive
Browse files Browse the repository at this point in the history
Fix default Docker image name when running Dockerized TeX Live without a project SDK
  • Loading branch information
PHPirates authored Nov 13, 2024
2 parents b122405 + a7be90b commit ebee52d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

### Fixed
* Fix default Docker image name when running Dockerized TeX Live without a project SDK

## [0.9.9-alpha.3] - 2024-11-12

Expand Down
6 changes: 4 additions & 2 deletions src/nl/hannahsten/texifyidea/run/compiler/LatexCompiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) {
val isMiktex = runConfig.getLatexDistributionType() == LatexDistributionType.MIKTEX
val isMiktex = runConfig.getLatexDistributionType() == LatexDistributionType.DOCKER_MIKTEX

if (isMiktex) {
// See https://hub.docker.com/r/miktex/miktex
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit ebee52d

Please sign in to comment.