Skip to content

Commit

Permalink
Fix a weird bug when removing directories (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Jun 12, 2021
1 parent 753b7f5 commit 42447e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
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

2 comments on commit 42447e6

@DilumAluthge
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/38710

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.0.1 -m "<description of version>" 42447e6dc0b3c0d04829d17646ddf6f67822d9e4
git push origin v4.0.1

Please sign in to comment.