Merge pull request #12162 from FnControlOption/patch-9

Add VS Code to list of fallback editors
This commit is contained in:
Mike McQuaid 2021-10-01 13:03:44 +01:00 committed by GitHub
commit 222a4e1a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,8 +363,8 @@ module Kernel
editor = Homebrew::EnvConfig.editor
return editor if editor
# Find Atom, Sublime Text, Textmate, BBEdit / TextWrangler, or vim
editor = %w[atom subl mate edit vim].find do |candidate|
# Find Atom, Sublime Text, VS Code, Textmate, BBEdit / TextWrangler, or vim
editor = %w[atom subl code mate edit vim].find do |candidate|
candidate if which(candidate, ENV["HOMEBREW_PATH"])
end
editor ||= "vim"