From aff7e88c7e2d1389568f2eadbe0d3b917de14826 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 4 Nov 2023 16:58:58 +0300 Subject: [PATCH] Add pandoc wrapper --- .../kotlin/space/kscience/snark/pandoc/PandocInstaller.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/snark-pandoc/src/jvmMain/kotlin/space/kscience/snark/pandoc/PandocInstaller.kt b/snark-pandoc/src/jvmMain/kotlin/space/kscience/snark/pandoc/PandocInstaller.kt index bbdb728..0c7eea0 100644 --- a/snark-pandoc/src/jvmMain/kotlin/space/kscience/snark/pandoc/PandocInstaller.kt +++ b/snark-pandoc/src/jvmMain/kotlin/space/kscience/snark/pandoc/PandocInstaller.kt @@ -100,7 +100,9 @@ internal object PandocInstaller { ) ) - Files.setPosixFilePermissions(pandocExecutablePath, setOf(PosixFilePermission.GROUP_EXECUTE)) + if (os == OSType.LINUX_AMD || os == OSType.LINUX_ARM) { + Files.setPosixFilePermissions(pandocExecutablePath, setOf(PosixFilePermission.GROUP_EXECUTE)) + } return pandocExecutablePath } @@ -180,7 +182,7 @@ internal object PandocInstaller { } private fun downloadWithRetry(url: URL): Path? { - val targetPath = Files.createTempFile("pandoc",".tmp") + val targetPath = Files.createTempFile("pandoc", ".tmp") log.info("Downloading pandoc to $targetPath") repeat(ATTEMPTS) {