Skip to content

Commit 955144f

Browse files
handle different error types
1 parent 7673b39 commit 955144f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/dependencies.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,13 @@ end
388388
PackageSpec(; name="CMake_jll", version = v"3.24.3")
389389
]
390390
platform = Platform("x86_64", "linux"; libc="musl", cxxstring_abi="cxx11", julia_version=nothing)
391+
391392
# Pkg needs improve its error message here, but assume that it will still throw a pkgerror
392393
# https://github.com/JuliaLang/Pkg.jl/issues/4159
393-
@test_throws Pkg.Types.PkgError test_setup_dependencies(prefix, dependencies, platform)
394+
# Before https://github.com/JuliaLang/Pkg.jl/pull/4151 this would throw a MethodError for `abspath(::Nothing)`
395+
# So this test will need fixing if/when that gets backported
396+
error_type = VERSION >= v"1.13.0-0" ? Pkg.Types.PkgError : MethodError
397+
@test_throws error_type test_setup_dependencies(prefix, dependencies, platform)
394398
end
395399
end
396400
end

0 commit comments

Comments
 (0)