We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.git
1 parent 7639cab commit 01630b1Copy full SHA for 01630b1
src/Prefix.jl
@@ -261,12 +261,8 @@ end
261
262
function setup(source::SetupSource{GitSource}, targetdir, verbose)
263
mkpath(targetdir)
264
- # Chop off the `.git-$(sha256(url))` at the end of the source.path
265
- name = basename(source.path)
266
- m = match(r"(.*)\.git-[0-9a-fA-F]{64}$", name)
267
- if m !== nothing
268
- name = m.captures[1]
269
- end
+ # Chop off the `.git-$(sha256(url))` at the end of the source.path (`.git` is optional).
+ name = replace(basename(source.path), r"(\.git)?-[0-9a-fA-F]{64}$" => "")
270
repo_dir = joinpath(targetdir, name)
271
if verbose
272
# Need to strip the trailing separator
0 commit comments