Skip to content

Commit

Permalink
Merge pull request #10 from headius/file_exists
Browse files Browse the repository at this point in the history
File.exists? is going away again in JRuby 10
  • Loading branch information
headius authored Jun 26, 2024
2 parents ef96c08 + 35bfc1b commit df949a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/ruby_maven.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def self.launch( *args )
ENV['M2_HOME'] = Maven.home

extensions = File.join( '.mvn/extensions.xml' )
if has_extensions = File.exists?( extensions )
if has_extensions = File.exist?( extensions )
# tests need copy instead of move
FileUtils.cp( extensions, extensions + ".orig" )
else
Expand Down
6 changes: 3 additions & 3 deletions spec/ruby_maven_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=9.3.0.0' )
end
_(out).must_match /mvn -Dverbose package/
_(File.exists?( gem_name )).must_equal true
_(File.exists?( '.mvn/extensions.xml' )).must_equal true
_(File.exists?( '.mvn/extensions.xml.orig' )).wont_equal true
_(File.exist?( gem_name )).must_equal true
_(File.exist?( '.mvn/extensions.xml' )).must_equal true
_(File.exist?( '.mvn/extensions.xml.orig' )).wont_equal true
end

end

0 comments on commit df949a4

Please sign in to comment.