Skip to content

Commit 1692d85

Browse files
authored
Use the proper destdir for cleanup_dependencies (#135)
1 parent 1204d3e commit 1692d85

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Prefix.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,13 +517,13 @@ function setup_dependencies(prefix::Prefix, dependencies::Vector{PkgSpec}, platf
517517
return artifact_paths
518518
end
519519

520-
function cleanup_dependencies(prefix::Prefix, artifact_paths)
520+
function cleanup_dependencies(prefix::Prefix, artifact_paths, platform)
521521
for art_path in artifact_paths
522522
# Unsymlink all destdirs within the prefix
523523
for dir in readdir(prefix.path; join=true)
524-
destdir = joinpath(dir, "destdir")
525-
if isdir(destdir)
526-
unsymlink_tree(art_path, destdir)
524+
ddir = destdir(prefix, platform)
525+
if isdir(ddir)
526+
unsymlink_tree(art_path, ddir)
527527
end
528528
end
529529
end

test/dependencies.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ end
105105
@test readdir(joinpath(destdir(dir, platform), "logs")) == ["Zlib.log.gz"]
106106

107107
# Make sure the directories are emptied by `cleanup_dependencies`
108-
@test_nowarn cleanup_dependencies(prefix, ap)
108+
@test_nowarn cleanup_dependencies(prefix, ap, platform)
109109
@test readdir(joinpath(destdir(dir, platform), "include")) == []
110110
@test readdir(joinpath(destdir(dir, platform), "logs")) == []
111111
end
@@ -123,7 +123,7 @@ end
123123
@test "libssh2." * platform_dlext(platform) in readdir(last(libdirs(Prefix(destdir(dir, platform)))))
124124

125125
# Make sure the directories are emptied by `cleanup_dependencies`
126-
@test_nowarn cleanup_dependencies(prefix, ap)
126+
@test_nowarn cleanup_dependencies(prefix, ap, platform)
127127
# This shuld be empty, but the `curl/` directory is left here, empty
128128
@test_broken readdir(joinpath(destdir(dir, platform), "include")) == []
129129
@test readdir(joinpath(destdir(dir, platform), "logs")) == []

0 commit comments

Comments
 (0)