Browse files

Warn user not to edit before first update

Because, if you do, your changes will be lost.
  • Loading branch information...
mxcl committed Aug 1, 2012
1 parent ed76c6d commit bfaa726c28483becd643a4b5a5dfeb8b6e937ac6
Showing with 8 additions and 0 deletions.
  1. +8 −0 Library/Homebrew/cmd/edit.rb
@@ -2,6 +2,14 @@
module Homebrew extend self
def edit
unless (HOMEBREW_PREFIX/'.git').directory?
raise <<-EOS.undent
Changes will be lost!
The first time you `brew update', all local changes will be lost, you should
thus `brew update' before you `brew edit'!
# If no brews are listed, open the project root in an editor.
if ARGV.named.empty?
editor = File.basename which_editor

0 comments on commit bfaa726

Please sign in to comment.