@@ -280,8 +280,9 @@ function rm(ctx::Context, pkgs::Vector{PackageSpec}; mode=PKGMODE_PROJECT, all_p
280280 if all_pkgs
281281 ! isempty (pkgs) && pkgerror (" cannot specify packages when operating on all packages" )
282282 append_all_pkgs! (pkgs, ctx, mode)
283+ else
284+ require_not_empty (pkgs, :rm )
283285 end
284- require_not_empty (pkgs, :rm )
285286
286287 for pkg in pkgs
287288 if pkg. name === nothing && pkg. uuid === nothing
@@ -352,8 +353,9 @@ function pin(ctx::Context, pkgs::Vector{PackageSpec}; all_pkgs::Bool=false, kwar
352353 if all_pkgs
353354 ! isempty (pkgs) && pkgerror (" cannot specify packages when operating on all packages" )
354355 append_all_pkgs! (pkgs, ctx, PKGMODE_PROJECT)
356+ else
357+ require_not_empty (pkgs, :pin )
355358 end
356- require_not_empty (pkgs, :pin )
357359
358360 for pkg in pkgs
359361 if pkg. name === nothing && pkg. uuid === nothing
@@ -383,8 +385,9 @@ function free(ctx::Context, pkgs::Vector{PackageSpec}; all_pkgs::Bool=false, kwa
383385 if all_pkgs
384386 ! isempty (pkgs) && pkgerror (" cannot specify packages when operating on all packages" )
385387 append_all_pkgs! (pkgs, ctx, PKGMODE_PROJECT)
388+ else
389+ require_not_empty (pkgs, :free )
386390 end
387- require_not_empty (pkgs, :free )
388391
389392 for pkg in pkgs
390393 if pkg. name === nothing && pkg. uuid === nothing
0 commit comments