Skip to content

Commit c6ebc9b

Browse files
authored
Merge pull request matplotlib#31970 from meeseeksmachine/auto-backport-of-pr-31969-on-v3.11.x
Backport PR matplotlib#31969 on branch v3.11.x (Stop passing symlinks to ImageMagick)
2 parents 1a6ba10 + 6091e12 commit c6ebc9b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/matplotlib/testing/compare.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ def _read_until(self, terminator):
100100
class _MagickConverter:
101101
def __call__(self, orig, dest):
102102
try:
103+
# ImageMagick may not be permitted to follow a symlink, so resolve it
104+
if orig.is_symlink():
105+
orig = orig.resolve()
103106
subprocess.run(
104107
[mpl._get_executable_info("magick").executable, orig, dest],
105108
check=True)

0 commit comments

Comments
 (0)