Skip to content

Commit

Permalink
fix: Fix File.exists? => File.exist?
Browse files Browse the repository at this point in the history
  • Loading branch information
ribose-jeffreylau committed Nov 20, 2024
1 parent 2cc6229 commit f249c35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/paneron/register/raw/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def to_h
end

def disk_to_h
if File.exists?(item_path)
if File.exist?(item_path)
@disk_to_h ||=
YAML.safe_load_file(
item_path,
Expand Down
4 changes: 2 additions & 2 deletions lib/paneron/register/raw/register.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def setup_git(
#------------------------------------

if git_url.nil?
if File.exists?(repo_path)
if File.exist?(repo_path)
# No remote, but local repo path exists.
# Simply open it as a Git repo.
@git_save_fn = nil
Expand Down Expand Up @@ -123,7 +123,7 @@ def setup_git(
@git_save_fn = git_init_fn

end
elsif File.exists?(repo_path)
elsif File.exist?(repo_path)
# Has remote, as well as local repo path.
@git_save_fn = nil

Expand Down

0 comments on commit f249c35

Please sign in to comment.