summaryrefslogtreecommitdiff
path: root/apt-private/private-upgrade.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-upgrade.cc')
-rw-r--r--apt-private/private-upgrade.cc6
1 files changed, 6 insertions, 0 deletions
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;