From c1f2c570bcd3ba5d8a37fee7311b956924765949 Mon Sep 17 00:00:00 2001 From: Delyan Angelov <delian66@gmail.com> Date: Tue, 6 Apr 2021 13:22:04 +0300 Subject: [PATCH] v.util: prevent diff tool lookups when VDIFF_TOOL is set --- vlib/v/util/diff.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/util/diff.v b/vlib/v/util/diff.v index 54e089dd6b..d28ac3f48d 100644 --- a/vlib/v/util/diff.v +++ b/vlib/v/util/diff.v @@ -8,6 +8,9 @@ import time pub fn find_working_diff_command() ?string { env_difftool := os.getenv('VDIFF_TOOL') env_diffopts := os.getenv('VDIFF_OPTIONS') + if env_difftool != '' { + return '$env_difftool $env_diffopts' + } mut known_diff_tools := []string{} if env_difftool.len > 0 { known_diff_tools << env_difftool