mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #19922 from Homebrew/brew_bundle_add_create
bundle/adder: create Brewfile if it doesn't exist.
This commit is contained in:
commit
6f39076b3c
@ -11,6 +11,9 @@ module Homebrew
|
||||
|
||||
sig { params(args: String, type: Symbol, global: T::Boolean, file: String).void }
|
||||
def add(*args, type:, global:, file:)
|
||||
brewfile_path = Brewfile.path(global:, file:)
|
||||
brewfile_path.write("") unless brewfile_path.exist?
|
||||
|
||||
brewfile = Brewfile.read(global:, file:)
|
||||
content = brewfile.input
|
||||
# TODO: - support `:describe`
|
||||
|
Loading…
x
Reference in New Issue
Block a user