93 Commits

Author SHA1 Message Date
Anatoli Babenia
9bf4e620e0 edit: show --build-from-source only for formulas 2025-04-11 17:15:55 +03:00
Anatoli Babenia
fb5438bfd1 Update Library/Homebrew/dev-cmd/edit.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-04-11 17:15:54 +03:00
Anatoli Babenia
fc0d7ac21d dev-cmd/edit: Actionable message about no API install 2025-04-11 17:15:54 +03:00
Tianshu Wang
4f62fd0789
Revert $TMPDIR for emacsclient 2024-09-05 15:49:11 +08:00
Mike McQuaid
08c7044598
dev-cmd/edit: simplify flag check.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2024-08-21 08:51:04 +01:00
Misty De Méo
89af10f29a dev-cmd/edit: correct path types
* Avoids passing the `--project` pseudopath to path checking methods
* Ensures the project path is a Pathname, not a String
2024-08-20 16:30:43 -07:00
Anatoli Babenia
bf87339bfb dev-cmd/edit: Show API install warning after the edit is done 2024-06-02 16:05:08 +03:00
Douglas Eichelberger
c50fb2dbd2 Remove redundant cli/parser requires 2024-03-29 18:53:07 -07:00
Douglas Eichelberger
2cc70549d8 Port Homebrew::DevCmd::Edit 2024-03-21 19:04:30 -07:00
Alice Carroll
9378b12d26
Re-export COLORTERM only locally in brew edit 2023-10-30 00:01:51 +03:00
Anatoli Babenia
0c51aea403 Fix typecheck errors 2023-09-27 12:49:37 +03:00
Anatoli Babenia
071a684b25 Replace refinements with local methods 2023-09-27 12:39:03 +03:00
Anatoli Babenia
10a55ec4e1
Rename fail_with_message to raise_with_message! 2023-09-27 08:27:13 +03:00
Anatoli Babenia
2445b687c6 Use any? to check for warning message and fix brew style 2023-09-26 10:10:47 +03:00
Anatoli Babenia
d16e7e1f32 Rename refinement 2023-09-25 18:50:38 +03:00
Anatoli Babenia
6c7f3eb233 Move condition in interpolated part into variable 2023-09-25 18:11:27 +03:00
Anatoli Babenia
e3c0dafbc4
Update Library/Homebrew/dev-cmd/edit.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-09-25 18:03:57 +03:00
Anatoli Babenia
cbee941502 Add proper sig for fail_with_message 2023-09-25 17:34:10 +03:00
Anatoli Babenia
7e835bcd97 Skip backticks when printing env var name 2023-09-25 17:22:18 +03:00
Anatoli Babenia
96ca1c561a Move helper Pathname methods into Refinement
https://docs.ruby-lang.org/en/2.4.0/syntax/refinements_rdoc.html
2023-09-25 17:21:21 +03:00
Anatoli Babenia
466055a1be Use regexp interpolation instead of string concat 2023-09-25 16:13:16 +03:00
Anatoli Babenia
63c60d2859 Rename fail to more descriptive fail_with_message 2023-09-25 15:58:52 +03:00
Anatoli Babenia
a78da3ecf0 Check paths exist before brew install warning 2023-09-25 15:56:41 +03:00
Anatoli Babenia
8f072dc05c Move error reporting logic for absent path to separate method 2023-09-25 15:56:41 +03:00
Anatoli Babenia
eae95670ef Separate logic that shows warning from path detection 2023-09-25 15:56:41 +03:00
Anatoli Babenia
1cbf5ce093 dev-cmd/edit: Move path specific functions to Pathname 2023-09-25 15:56:41 +03:00
Anatoli Babenia
84ce25d370
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.
2023-09-25 06:48:18 +03:00
Anatoli Babenia
a0a4fa4ed9
dev-cmd/edit: ignore linefeed in the message 2023-09-23 13:01:43 +03:00
Anatoli Babenia
4d625d03fc
dev-cmd/edit: make the warning easier to read 2023-09-23 12:56:26 +03:00
Eric Knibbe
b3ecd91f97
dev-cmd/edit: suggest tapping core repositories 2023-08-01 13:39:28 -04:00
Alexander Bayandin
e36790ab5c
cmd/edit: fix error message for formula 2023-06-23 11:11:31 +00:00
Bo Anderson
bb7aef85db
Migrate remaining no-api commands to new scoped system 2023-06-22 17:11:20 +01:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Mike McQuaid
0406279ad3
More Formula/Casks sharding fixes
- Stop `brew style` from complaining
- Fix message reference in `brew edit`
2023-02-28 11:52:38 +00:00
Sanjito Kurniawan
2daae5e84d
edit: add HOMEBREW_NO_INSTALL_FROM_API warning. 2023-02-14 12:04:10 +00:00
apainintheneck
a7dbd738dd cmd/edit: stop double warning
When you don't have EDITOR or HOMEBREW_EDITOR
configured `brew edit` printed a double warning.

This silences the first of those.
2023-02-11 00:16:11 -08:00
Rylan Polster
ce56fc8afd
Remove unecessary message of brew edit 2023-02-06 16:24:34 +01:00
Mike McQuaid
97def3c104
install: better error when using API and --HEAD.
- Tell people what to do to resolve this
- Tweak the instruction ordering to be consistent elsewhere
2023-01-26 11:08:56 +00:00
Mike McQuaid
46d727b475
HOMEBREW_INSTALL_FROM_API: various improvements.
- flip the messaging to refer to `HOMEBREW_NO_INSTALL_FROM_API` where relevant
- remove some duplicate checks
- better scope checks to just core tap formulae
2023-01-25 14:29:35 +00:00
Mike McQuaid
37be5bea52
dev-cmd/edit: handle editing with install_from_api.
Before this change, this would fail every time, even when available on
disk (which was not the case for formulae).

With this change, it will attempt to find it from a tap on disk and only
fail if it cannot be found in any.
2023-01-04 13:51:21 +00:00
hyuraku
47699614fd repair the command option 2022-04-12 08:39:03 +09:00
hyuraku
f8a05b7338 arrange error message of 'brew edit --cask' 2022-04-11 22:31:44 +09:00
Nathan Woythaler
0b8605bcbe
Add --print-path flag to brew edit
Add a `--print-path` flag to `brew edit`, in order to print the source `.rb`
file of both casks and formulae. In order to prevent faulty reporting, `brew
formula $SOME_CASK` will now error out if a cask matches, but a formula does
not.
2021-10-20 09:04:59 +01:00
Misty De Meo
04c8e896a5
edit: enable Sublime Text project view 2021-08-01 15:36:48 -07:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
2ae4f11963 reorder command flags 2021-01-26 15:36:44 -05:00
EricFromCanada
a427de5bee capitalization fixes
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
EricFromCanada
2e982cd2a2 use odie when commands encounter errors 2021-01-26 15:36:43 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Dawid Dziurla
cf654da251
dev-cmd: indicate multiple named args in usage banner 2021-01-15 13:04:07 +01:00