From 4d625d03fc6e17c284d4c0322edbce2cd812b4f0 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Sat, 23 Sep 2023 12:56:26 +0300 Subject: [PATCH 1/3] dev-cmd/edit: make the warning easier to read --- Library/Homebrew/dev-cmd/edit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/dev-cmd/edit.rb b/Library/Homebrew/dev-cmd/edit.rb index 2690cbfe52..90334a33ca 100644 --- a/Library/Homebrew/dev-cmd/edit.rb +++ b/Library/Homebrew/dev-cmd/edit.rb @@ -63,8 +63,8 @@ module Homebrew !Homebrew::EnvConfig.no_install_from_api? && !Homebrew::EnvConfig.no_env_hints? opoo <<~EOS - Unless `HOMEBREW_NO_INSTALL_FROM_API` is set when running `brew install`, - it will ignore any locally edited #{(core_cask_path || core_cask_tap) ? "casks" : "formulae"}. + `brew install` ignores locally edited #{(core_cask_path || core_cask_tap) ? "casks" : "formulae"}, + if `HOMEBREW_NO_INSTALL_FROM_API` is not set. EOS edit_api_message_displayed = true end From a0a4fa4ed9e5a5ef79ed8ecaebd4236f1a6dbdc8 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Sat, 23 Sep 2023 13:01:43 +0300 Subject: [PATCH 2/3] dev-cmd/edit: ignore linefeed in the message --- Library/Homebrew/dev-cmd/edit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/edit.rb b/Library/Homebrew/dev-cmd/edit.rb index 90334a33ca..4bf9b207b0 100644 --- a/Library/Homebrew/dev-cmd/edit.rb +++ b/Library/Homebrew/dev-cmd/edit.rb @@ -63,7 +63,7 @@ module Homebrew !Homebrew::EnvConfig.no_install_from_api? && !Homebrew::EnvConfig.no_env_hints? opoo <<~EOS - `brew install` ignores locally edited #{(core_cask_path || core_cask_tap) ? "casks" : "formulae"}, + `brew install` ignores locally edited #{(core_cask_path || core_cask_tap) ? "casks" : "formulae"} \ if `HOMEBREW_NO_INSTALL_FROM_API` is not set. EOS edit_api_message_displayed = true From 84ce25d370552032c2b61871912714ae52694ba3 Mon Sep 17 00:00:00 2001 From: Anatoli Babenia Date: Mon, 25 Sep 2023 06:48:18 +0300 Subject: [PATCH 3/3] Make warning message fit 80 char limit The longest line below limit is 59 chars this way. Warning: `brew install` ignores locally edited formulae if `HOMEBREW_NO_INSTALL_FROM_API` is not set. --- Library/Homebrew/dev-cmd/edit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/dev-cmd/edit.rb b/Library/Homebrew/dev-cmd/edit.rb index 4bf9b207b0..40cf56a785 100644 --- a/Library/Homebrew/dev-cmd/edit.rb +++ b/Library/Homebrew/dev-cmd/edit.rb @@ -63,8 +63,8 @@ module Homebrew !Homebrew::EnvConfig.no_install_from_api? && !Homebrew::EnvConfig.no_env_hints? opoo <<~EOS - `brew install` ignores locally edited #{(core_cask_path || core_cask_tap) ? "casks" : "formulae"} \ - if `HOMEBREW_NO_INSTALL_FROM_API` is not set. + `brew install` ignores locally edited #{(core_cask_path || core_cask_tap) ? "casks" : "formulae"} if + `HOMEBREW_NO_INSTALL_FROM_API` is not set. EOS edit_api_message_displayed = true end