@@ -42,7 +42,6 @@ import Text.Pandoc.Error (PandocError (PandocPDFProgramNotFoundError))
4242import Text.Pandoc.MIME (getMimeType)
4343import Text.Pandoc.Options (HTMLMathMethod (..), WriterOptions (..))
4444import Text.Pandoc.Process (pipeProcess)
45−import System.Process (readProcess)
4645import Text.Pandoc.Shared (inDirectory, stringify)
4746import qualified Text.Pandoc.UTF8 as UTF8
4847import Text.Pandoc.Walk (walkM)
@@ -90,9 +89,7 @@ makePDF program pdfargs writer opts doc =
9089 -- user names (see #777)
9190 let withTempDir templ action = do
9291 tmp <- getTemporaryDirectory
93− uname <- E.catch (readProcess "uname" ["-o"] "")
94− (\(_ :: E.SomeException) -> return "")
95− if '~' `elem` tmp || uname == "Cygwin" -- see #5451
92+ if '~' `elem` tmp
9693 then withTempDirectory "." templ action
9794 else withSystemTempDirectory templ action
9895 (newCommonState, res) <- liftIO $ withTempDir "tex2pdf." $ \tmpdir' -> do