From 5644ec925f723757d15d08eb8d66cf347730065d Mon Sep 17 00:00:00 2001 From: t-bltg Date: Tue, 12 Nov 2024 10:00:05 +0100 Subject: [PATCH] fix tempname usage (#5023) --- .github/workflows/ci.yml | 1 + src/animation.jl | 2 +- src/init.jl | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a401d27e..dc857cd33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,7 @@ jobs: matrix: version: - '1.6' # LTS (minimal declared julia compat in `Project.toml`) + - 'lts' - '1' # latest stable experimental: - false diff --git a/src/animation.jl b/src/animation.jl index 2b0847963..574c3cdcf 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -165,7 +165,7 @@ function Base.show(io::IO, ::MIME"text/html", agif::AnimatedGif) "" elseif ext in ("mov", "mp4", "webm") mimetype = ext == "mov" ? "video/quicktime" : "video/$ext" - "" + "" else error("Cannot show animation with extension $ext: $agif") end diff --git a/src/init.jl b/src/init.jl index a3f955be5..ef314c977 100644 --- a/src/init.jl +++ b/src/init.jl @@ -125,7 +125,7 @@ include(_path(backend_name())) $func() = begin # evaluate each example in a local scope $(_examples[i].exprs) $i == 1 || return # only for one example - fn = joinpath(scratch_dir, tempname()) + fn = tempname(scratch_dir) pl = current() show(devnull, pl) showable(MIME"image/png"(), pl) && savefig(pl, "$fn.png")