Skip to content

Change exist method for gitignore#291

Open
muhenge wants to merge 1 commit intolaserlemon:mainfrom
muhenge:Muhenge-Fix
Open

Change exist method for gitignore#291
muhenge wants to merge 1 commit intolaserlemon:mainfrom
muhenge:Muhenge-Fix

Conversation

@muhenge
Copy link
Copy Markdown

@muhenge muhenge commented Feb 23, 2023

-Fix typo in the ignore_configuration method

This pull request fixes a typo in the ignore_configuration method of the project's codebase. The current implementation uses File.exists? to check if a .gitignore file exists, which should be replaced with File.exist? for consistency with Ruby's standard library.

I have tested this change on my local machine and confirmed that it resolves the issue.

Copy link
Copy Markdown

@scott-white-kin scott-white-kin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same issue and this looks like a good fix

@joao-saraiva
Copy link
Copy Markdown

This would fix on new versions but maybe crash on older versions, i think you should check the RUBY_VERSION, because old ruby versions still use .exists?

@gazayas gazayas mentioned this pull request Jun 23, 2023
@DavidAmyot
Copy link
Copy Markdown

Any chance of this being merged soon? Have to work with a fork otherwise.

Thanks :)

@cb341
Copy link
Copy Markdown

cb341 commented Aug 21, 2023

A merge would be quite nice

@cooljl31
Copy link
Copy Markdown

I think this should already be merged, I almost wanted to create a new PR for the same Issue, can someone please merge this PR thanks :)

@lucasfontes2604
Copy link
Copy Markdown

This would fix on new versions but maybe crash on older versions, i think you should check the RUBY_VERSION, because old ruby versions still use .exists?

The "exist?" method is also valid for old Ruby versions. The repository is using it in some files.
Can someone with access merge this PR to solve the issue?

cc @laserlemon.

@Jberma23
Copy link
Copy Markdown

I believe the new alternative in 7+ is Pathname.new(path_name).exist?

@rnestler
Copy link
Copy Markdown

rnestler commented Sep 3, 2024

This was fixed in #294 so this PR can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants