X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/bc0a5999a7ec4f23bfbb7f26f065251c4eb79146..a5e790985752c6820e08e7a7e650e1607fa826e4:/apt-private/private-upgrade.cc diff --git a/apt-private/private-upgrade.cc b/apt-private/private-upgrade.cc index 85b5a492a..eb546e3e3 100644 --- a/apt-private/private-upgrade.cc +++ b/apt-private/private-upgrade.cc @@ -13,6 +13,9 @@ packages */ bool DoUpgradeNoNewPackages(CommandLine &CmdL) { + if (CmdL.FileSize() != 1) + return _error->Error(_("The upgrade command takes no arguments")); + CacheFile Cache; if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false; @@ -31,6 +34,9 @@ bool DoUpgradeNoNewPackages(CommandLine &CmdL) // DoSafeUpgrade - Upgrade all packages with install but not remove /*{{{*/ bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL) { + if (CmdL.FileSize() != 1) + return _error->Error(_("The upgrade command takes no arguments")); + CacheFile Cache; if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) return false;