Skip to content

Commit

Permalink
Fixes wycats#66 (undefined local variable or method `filename' for Bu…
Browse files Browse the repository at this point in the history
…ndler::Environment:Class)
  • Loading branch information
wycats committed Oct 20, 2009
1 parent 15dddce commit 2aa70b3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@
.DS_Store
tmp
pkg
pkg
testing/Gemfile
3 changes: 3 additions & 0 deletions lib/bundler/cli.rb
Expand Up @@ -25,6 +25,9 @@ def self.run(command, options = {})
rescue SourceNotCached => e
Bundler.logger.error e.message
exit 9
rescue ManifestFileNotFound => e
Bundler.logger.error e.message
exit 10
end

def initialize(options)
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/environment.rb
Expand Up @@ -14,7 +14,7 @@ def self.load(gemfile = nil)
gemfile = gemfile ? Pathname.new(gemfile).expand_path : default_manifest_file

unless gemfile.file?
raise ManifestFileNotFound, "#{filename.inspect} does not exist"
raise ManifestFileNotFound, "Manifest file not found: #{gemfile.to_s.inspect}"
end

new(gemfile)
Expand Down
5 changes: 5 additions & 0 deletions spec/bundler/cli_spec.rb
Expand Up @@ -125,6 +125,11 @@
end
end

it "raises when providing a bad manifest" do
out = gem_command :bundle, "-m manifest_not_here"
out.should =~ /Manifest file not found: \".*manifest_not_here\"/
end

describe "it working while specifying the manifest file name" do
it "works when the manifest is in the root directory" do
build_manifest_file bundled_app('manifest.rb'), <<-Gemfile
Expand Down

0 comments on commit 2aa70b3

Please sign in to comment.