Skip to content

Commit

Permalink
fix ambiguity in apps rm (#4144)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Jan 29, 2025
1 parent ecdf6aa commit 6091533
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/Apps/Apps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,19 @@ end


function require_not_empty(pkgs, f::Symbol)
pkgs === nothing && return
isempty(pkgs) && pkgerror("app $f requires at least one package")

if pkgs == nothing || isempty(pkgs)
pkgerror("app $f requires at least one package")
end
end

rm(pkgs_or_apps::String) = rm([pkgs_or_apps])
function rm(pkgs_or_apps::Union{Vector, Nothing})
if pkgs_or_apps === nothing
rm(nothing)
else
for pkg_or_app in pkgs_or_apps
if pkg_or_app isa String
pkg_or_app = PackageSpec(pkg_or_app)
end
rm(pkg_or_app)
function rm(pkgs_or_apps::Vector)
for pkg_or_app in pkgs_or_apps
if pkg_or_app isa String
pkg_or_app = PackageSpec(pkg_or_app)
end
rm(pkg_or_app)
end
end

Expand Down

0 comments on commit 6091533

Please sign in to comment.