Skip to content

Instantly share code, notes, and snippets.

@lazyatom
Forked from defunkt/gist:168928
Created August 17, 2009 08:39
Show Gist options
  • Save lazyatom/169000 to your computer and use it in GitHub Desktop.
Save lazyatom/169000 to your computer and use it in GitHub Desktop.
➜ rip (file_conflicts)⚡ $ rip use empty; rip env delete test; rip env create test; rip install monk
ripenv: using empty
ripenv: deleted test
ripenv: created test
Successfully installed thor (0.11.5)
Some files from wycats-thor (0.11.5) conflict with those already installed by thor:
lib/thor
lib/thor/actions
lib/thor/actions/create_file.rb
lib/thor/actions/directory.rb
lib/thor/actions/empty_directory.rb
lib/thor/actions/file_manipulation.rb
lib/thor/actions/inject_into_file.rb
lib/thor/actions.rb
lib/thor/base.rb
lib/thor/core_ext
lib/thor/core_ext/hash_with_indifferent_access.rb
lib/thor/core_ext/ordered_hash.rb
lib/thor/error.rb
lib/thor/group.rb
lib/thor/invocation.rb
lib/thor/parser
lib/thor/parser/argument.rb
lib/thor/parser/arguments.rb
lib/thor/parser/option.rb
lib/thor/parser/options.rb
lib/thor/parser.rb
lib/thor/rake_compat.rb
lib/thor/runner.rb
lib/thor/shell
lib/thor/shell/basic.rb
lib/thor/shell/color.rb
lib/thor/shell.rb
lib/thor/task.rb
lib/thor/util.rb
lib/thor.rb
bin/rake2thor
bin/thor
rip: installation failed
➜ rip (file_conflicts)⚡ $ rip list
ripenv: test
thor (0.11.5)
dependencies (0.0.6)
monk (0.0.5)
➜ rip (file_conflicts)⚡ $ rip install monk
monk (0.0.5) already installed
➜ rip (file_conflicts)⚡ $ git diff
diff --git a/lib/rip/installer.rb b/lib/rip/installer.rb
index 0e2b152..d115db6 100644
--- a/lib/rip/installer.rb
+++ b/lib/rip/installer.rb
@@ -45,7 +45,7 @@ module Rip
ui.puts "Successfully installed #{package}" unless package.meta_package?
true
- rescue VersionConflict => e
+ rescue FileConflict, VersionConflict => e
ui.puts e.message
rollback
ui.abort "installation failed"
➜ rip (file_conflicts)⚡ $ git commit -a -m "Handle a file conflict in the same way as a version conflict."
[file_conflicts 60a2eee] Handle a file conflict in the same way as a version conflict.
1 files changed, 1 insertions(+), 1 deletions(-)
➜ rip (file_conflicts) $ git push
Counting objects: 9, done.
Delta compression using 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 475 bytes, done.
Total 5 (delta 3), reused 0 (delta 0)
To git@github.com:lazyatom/rip.git
14f75b9..60a2eee file_conflicts -> file_conflicts
➜ rip (file_conflicts) $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment