From 84a7c2ba7d1b45764cc5381f67d63eec1448de9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?fn=20=E2=8C=83=20=E2=8C=A5?= <70830482+FnControlOption@users.noreply.github.com> Date: Thu, 30 Sep 2021 18:54:51 -0700 Subject: [PATCH] Add VS Code to list of fallback editors --- Library/Homebrew/utils.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 361cc285f7..14cb73cd41 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -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"