Skip to content

Commit

Permalink
keep -d flag with envopts
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Apr 11, 2024
1 parent 357e90c commit 74486d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/v/util/diff/diff.v
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ pub fn find_working_diff_command() !string {
}
}
if diffcmd in ['code', 'code.cmd'] {
cmd := '${diffcmd} ${if env_diffopts != '' { env_diffopts } else { '-d' }}'
return cmd
// Make sure the diff flag `-d` is included in any case.
return '${diffcmd} ${env_diffopts} -d'
}
// Don't add spaces to the cmd if there are no `env_diffopts`.
return if env_diffopts != '' { '${diffcmd} ${env_diffopts}' } else { diffcmd }
Expand Down

0 comments on commit 74486d3

Please sign in to comment.