mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: support for 'VDIFF_OPTIONS=-w'
This commit is contained in:
parent
f5fca00d37
commit
13783aea70
@ -163,9 +163,10 @@ pub fn find_working_diff_command() ?string {
|
||||
}
|
||||
|
||||
pub fn color_compare_files(diff_cmd, file1, file2 string) string {
|
||||
if diff_cmd != '' {
|
||||
if diff_cmd != '' {
|
||||
mut other_options := os.getenv('VDIFF_OPTIONS')
|
||||
full_cmd := '$diff_cmd --minimal --text --unified=2 ' +
|
||||
' --show-function-line="fn " "$file1" "$file2" '
|
||||
' --show-function-line="fn " $other_options "$file1" "$file2" '
|
||||
x := os.exec(full_cmd) or {
|
||||
return 'comparison command: `${full_cmd}` failed'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user