mirror of
https://github.com/julia-actions/julia-buildpkg.git
synced 2026-02-18 20:16:55 +08:00
Remove empty repo URLs with keepempty
This commit is contained in:
@@ -52,9 +52,8 @@ runs:
|
|||||||
|
|
||||||
# If provided add local registries
|
# If provided add local registries
|
||||||
if !isempty("${{ inputs.localregistry }}")
|
if !isempty("${{ inputs.localregistry }}")
|
||||||
local_repos = split("${{ inputs.localregistry }}", "\n") .|> string
|
local_repos = split("${{ inputs.localregistry }}", "\n"; keepempty=false) .|> string
|
||||||
for repo_url in local_repos
|
for repo_url in local_repos
|
||||||
isempty(repo_url) && continue
|
|
||||||
# https://github.com/JuliaLang/Pkg.jl/issues/3753
|
# https://github.com/JuliaLang/Pkg.jl/issues/3753
|
||||||
if !any(r -> r.repo == repo_url, Pkg.Registry.reachable_registries())
|
if !any(r -> r.repo == repo_url, Pkg.Registry.reachable_registries())
|
||||||
Pkg.Registry.add(Pkg.RegistrySpec(; url = repo_url))
|
Pkg.Registry.add(Pkg.RegistrySpec(; url = repo_url))
|
||||||
|
|||||||
Reference in New Issue
Block a user