Skip to content

Commit

Permalink
Fix unforgiving ENV["HOME"] in Path spec (#8667)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored and RX14 committed Jan 10, 2020
1 parent 9623919 commit 36a4a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/std/path_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ end

private def it_expands_path(path, posix, windows = posix, *, base = nil, env_home = nil, expand_base = false, home = false, file = __FILE__, line = __LINE__)
assert_paths(path, posix, windows, %((base: "#{base}")), file, line) do |path|
prev_home = ENV["HOME"]
prev_home = ENV["HOME"]?

begin
ENV["HOME"] = env_home || (path.windows? ? HOME_WINDOWS : HOME_POSIX)
Expand Down

0 comments on commit 36a4a17

Please sign in to comment.