Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions bin/rock-bundle-find
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ end

Bundles.each_bundle do |bdl|
if bdl.name == name
if !quiet
puts bdl.path
end
exit 0
if bdl.registered?
puts bdl.name
else
puts bdl.path
end
exit 0
end
end

if !quiet
STDERR.puts "cannot find required bundle"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rock/bundles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Bundle
def registered?
paths = (ENV['ROCK_BUNDLE_PATH'] || '').split(":")
paths.any? do |p|
p == path || path =~ /^#{Regexp.quote(p)}/
p == path || !(path =~ /^#{Regexp.quote(p)}/).nil?
end
end

Expand Down