summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-01 11:23:31 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-01 11:40:32 +0900
commitaa8c6759ee7d740939eab9ee0e94260aa8f4f010 (patch)
tree0d81f00a9d93feaa9635deeb1279df2ba9904bf9
parent2d3ecc4d284b5c16a98f68fcf3265d3451ffe61c (diff)
vcs.rb: do not reference the constant before assignment
-rw-r--r--tool/lib/vcs.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index d96caddbf2..857b7928a4 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -424,12 +424,12 @@ class VCS
SAFE_DIRECTORIES ||=
begin
command = ENV["GIT"] || 'git'
- IO.popen(%W"#{command} config --global --get-all safe.directory", &:read).split("\n")
+ dirs = IO.popen(%W"#{command} config --global --get-all safe.directory", &:read).split("\n")
rescue
command = nil
- []
+ dirs = []
ensure
- VCS.dump(SAFE_DIRECTORIES, "safe.directory: ") if $DEBUG
+ VCS.dump(dirs, "safe.directory: ") if $DEBUG
COMMAND = command
end