Skip to content

Commit e6b8c01

Browse files
committed
Include a workaround for preferences on older Julia versions.
1 parent 9458b39 commit e6b8c01

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/runtests.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ using Dates
33
import REPL
44
using Printf: @sprintf
55

6+
# work around JuliaLang/Pkg.jl#2500
7+
if VERSION < v"1.8"
8+
test_project = first(Base.load_path())
9+
preferences_file = joinpath(dirname(@__DIR__), "LocalPreferences.toml")
10+
test_preferences_file = joinpath(dirname(test_project), "LocalPreferences.toml")
11+
if isfile(preferences_file) && !isfile(test_preferences_file)
12+
cp(preferences_file, test_preferences_file)
13+
end
14+
end
15+
616
# parse some command-line arguments
717
function extract_flag!(args, flag, default=nothing)
818
for f in args

0 commit comments

Comments
 (0)