Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a weird bug when removing directories #45

Merged
merged 3 commits into from
Jun 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BumpStdlibs"
uuid = "10e0400f-8273-43d0-bd6e-07483373ba4f"
authors = ["Dilum Aluthge", "contributors"]
version = "4.0.0"
version = "4.0.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
11 changes: 9 additions & 2 deletions src/bump-stdlibs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,24 @@ function _bump_single_stdlib(stdlib::StdlibInfo, config::Config, state::State)
startswith(strip(file), "$(name)-") && ispath(full_path) && rm(full_path; force = true, recursive = true)
end
end
directories_to_delete = String[]
for (root, dirs, files) in walkdir(joinpath(pwd(), "deps", "checksums"))
for dir in dirs
full_path = joinpath(root, dir)
if startswith(strip(dir), "$(name)-")
@debug "" root dir full_path
if ispath(full_path)
rm(full_path; force = true, recursive = true)
if isdir(full_path)
push!(directories_to_delete, full_path)
end
end
end
end
for full_path in directories_to_delete
@debug "" full_path
if isdir(full_path)
rm(full_path; force = true, recursive = true)
end
end
checksum_files_that_need_refreshing = String[]
for (root, dirs, files) in walkdir(joinpath(pwd(), "deps", "checksums"))
for file in files
Expand Down