Skip to content

Commit

Permalink
s/exists?/exist?/
Browse files Browse the repository at this point in the history
Fixes:

```
       -----> Building on the Heroku-24 stack
       -----> Fetching https://github.com/heroku/heroku-buildpack-ruby#schneems/default-ruby-336 buildpack...
              buildpack downloaded
       -----> Ruby app detected
       
        !
        !     undefined method `exists?' for class Dir
        !
       /tmp/buildpacks/55030ecaa578151bf5924184e8750b99212faef5/lib/language_pack/helpers/bundler_wrapper.rb:242:in `fetch_bundler': undefined method `exists?' for class Dir (NoMethodError)
           return true if Dir.exists?(bundler_path)
                             ^^^^^^^^
       Did you mean?  exist?
```
  • Loading branch information
schneems committed Jan 27, 2025
1 parent 9848194 commit 08644d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/language_pack/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def build_release

def write_release_yaml
release = build_release
FileUtils.mkdir("tmp") unless File.exists?("tmp")
FileUtils.mkdir("tmp") unless File.exist?("tmp")
File.open("tmp/heroku-buildpack-release-step.yml", 'w') do |f|
f.write(release.to_yaml)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/language_pack/helpers/bundler_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def bundler_version_escape_valve!

private
def fetch_bundler
return true if Dir.exists?(bundler_path)
return true if Dir.exist?(bundler_path)

topic("Installing bundler #{@version}")
bundler_version_escape_valve!
Expand Down
2 changes: 1 addition & 1 deletion lib/language_pack/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def read(key)

def exists?(key)
full_key = "#{FOLDER}/#{key}"
File.exist?(full_key) && !Dir.exists?(full_key)
File.exist?(full_key) && !Dir.exist?(full_key)
end
alias_method :include?, :exists?

Expand Down

0 comments on commit 08644d0

Please sign in to comment.