Skip to content

Commit 8300c52

Browse files
committed
Reuse a cmd array created for printing
Fixes 21c7131 differently. This makes it less likely that the printed command is deviated from what's actually executed.
1 parent 4a1d078 commit 8300c52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tool/auto-style.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def diff
7171
private
7272

7373
def git(*args, **opts)
74-
cmd = ['git', *args].shelljoin
75-
puts "+ #{cmd}"
76-
ret = with_clean_env { system('git', *args, **opts) }
74+
cmd = ['git', *args]
75+
puts "+ #{cmd.shelljoin}"
76+
ret = with_clean_env { system(*cmd, **opts) }
7777
unless ret or opts[:err]
7878
abort "Failed to run: #{cmd}"
7979
end

0 commit comments

Comments
 (0)