Skip to content

Commit

Permalink
Fix tests on JRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Dec 26, 2023
1 parent 05e25b7 commit 862c937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/simplecov/load_global_config.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require "etc"
home_dir = (Dir.home && File.expand_path("~")) || Etc.getpwuid.dir || (ENV.fetch("USER", nil) && File.expand_path("~#{ENV.fetch('USER', nil)}"))
home_dir = Dir.home || File.expand_path("~") || Etc.getpwuid.dir || (ENV.fetch("USER", nil) && File.expand_path("~#{ENV.fetch('USER', nil)}"))
if home_dir
global_config_path = File.join(home_dir, ".simplecov")
load global_config_path if File.exist?(global_config_path)
Expand Down

0 comments on commit 862c937

Please sign in to comment.