diff --git a/.github/actions/cache-apt-packages-action/action.yml b/.github/actions/cache-apt-packages-action/action.yml index c8ba18e2af..a889a1969f 100644 --- a/.github/actions/cache-apt-packages-action/action.yml +++ b/.github/actions/cache-apt-packages-action/action.yml @@ -19,7 +19,7 @@ runs: with: version: 1.0 packages: expect binutils postgresql sqlite3 clang valgrind \ - imagemagick openimageio-tools xvfb xsel xclip \ + imagemagick graphicsmagick-imagemagick-compat openimageio-tools xvfb xsel xclip \ liblapack3 libopenblas-base liblapacke-dev libopenblas-dev libopenmpi-dev \ libsodium-dev libpq-dev libssl-dev libsqlite3-dev \ libfreetype6-dev libxi-dev libxcursor-dev \ diff --git a/cmd/tools/vgret.v b/cmd/tools/vgret.v index 0a0d84e7b6..12f52b2517 100644 --- a/cmd/tools/vgret.v +++ b/cmd/tools/vgret.v @@ -379,7 +379,12 @@ fn take_screenshots(opt Options, app AppConfig) ![]string { // Use ImageMagick's `import` tool to take the screenshot out_file := os.join_path(out_path, os.file_name(app.path) + '_screenshot_${existing_screenshots.len:02}.png') - result := opt.verbose_execute('import -window root "${out_file}"') + screenshot_command := if opt.verbose_execute('import --version').exit_code != 0 { + 'gm import -window root' + } else { + 'import -window root' + } + result := opt.verbose_execute('${screenshot_command} ${os.quoted_path(out_file)}') if result.exit_code != 0 { p_app.signal_kill() return error('Failed taking screenshot of `${app.abs_path}` to "${out_file}":\n${result.output}')