Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jul 5, 2023
1 parent e2ce61e commit 94a6a65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/GitTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ function clone(io::IO, url, source_path; header=nothing, credentials=nothing, kw
end
try
if use_cli_git()
cmd = `git clone --quiet $url $source_path`
try
cmd = `git clone --quiet $url $source_path`
run(pipeline(cmd; stdout=devnull))
catch err
Pkg.Types.pkgerror("The command `$(cmd)` failed, error: $err")
Expand Down Expand Up @@ -166,8 +166,8 @@ function fetch(io::IO, repo::LibGit2.GitRepo, remoteurl=nothing; header=nothing,
if use_cli_git()
let remoteurl=remoteurl
cd(LibGit2.path(repo)) do
cmd = `git fetch -q $remoteurl $(only(refspecs))`
try
cmd = `git fetch -q $remoteurl $(only(refspecs))`
run(pipeline(cmd; stdout=devnull))
catch err
Pkg.Types.pkgerror("The command `$(cmd)` failed, error: $err")
Expand Down
4 changes: 2 additions & 2 deletions test/new.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2705,8 +2705,8 @@ end
Pkg.rm(TEST_PKG.name)
end
@testset "libgit2 failures" begin
doesnotexist = "https:://github.com/DoesNotExist/DoesNotExist.jl"
@test_throws Pkg.Types.PkgError Pkg.add(url=doesnotexist; use_git_for_all_downloads=true)
doesnotexist = "https://github.com/DoesNotExist/DoesNotExist.jl"
@test_throws Pkg.Types.PkgError Pkg.add(url=doesnotexist, use_git_for_all_downloads=true)
@test_throws Pkg.Types.PkgError Pkg.Registry.add(RegistrySpec(url=doesnotexist); use_git_for_all_downloads=true)
end
@testset "tarball downloads" begin
Expand Down

0 comments on commit 94a6a65

Please sign in to comment.