Skip to content

Commit 6091e12

Browse files
ayshihmeeseeksmachine
authored andcommitted
Backport PR matplotlib#31969: Stop passing symlinks to ImageMagick
1 parent 1a6ba10 commit 6091e12

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)