Skip to content

Commit 6f39076

Browse files
authored
Merge pull request #19922 from Homebrew/brew_bundle_add_create
bundle/adder: create Brewfile if it doesn't exist.
2 parents bfce68a + ef4bea6 commit 6f39076

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Library/Homebrew/bundle/adder.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ module Adder
1111

1212
sig { params(args: String, type: Symbol, global: T::Boolean, file: String).void }
1313
def add(*args, type:, global:, file:)
14+
brewfile_path = Brewfile.path(global:, file:)
15+
brewfile_path.write("") unless brewfile_path.exist?
16+
1417
brewfile = Brewfile.read(global:, file:)
1518
content = brewfile.input
1619
# TODO: - support `:describe`

0 commit comments

Comments
 (0)