From aa8c6759ee7d740939eab9ee0e94260aa8f4f010 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 1 Nov 2022 11:23:31 +0900 Subject: [PATCH] vcs.rb: do not reference the constant before assignment --- tool/lib/vcs.rb | 6 +++--- 1 file 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