Skip to content

Commit 8b700a7

Browse files
authored
Don't chop of .git if there is no .git (#94)
1 parent 4e508b4 commit 8b700a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Prefix.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,11 @@ end
254254
function setup(source::SetupSource{GitSource}, targetdir, verbose)
255255
mkpath(targetdir)
256256
# Chop off the `.git` at the end of the source.path
257-
repo_dir = joinpath(targetdir, basename(source.path)[1:end-4])
257+
name = basename(source.path)
258+
if endswith(name, ".git")
259+
name = name[1:end-4]
260+
end
261+
repo_dir = joinpath(targetdir, name)
258262
if verbose
259263
# Need to strip the trailing separator
260264
path = strip_backslash(targetdir)

0 commit comments

Comments
 (0)