summaryrefslogtreecommitdiff
path: root/src/frontend/cli
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/cli')
-rwxr-xr-xsrc/frontend/cli/sisyphus-cli.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py
index e7637cb..ff68593 100755
--- a/src/frontend/cli/sisyphus-cli.py
+++ b/src/frontend/cli/sisyphus-cli.py
@@ -8,11 +8,20 @@ pkgList = sys.argv[2:]
if "__main__" == __name__:
if sys.argv[1:]:
if "install" in sys.argv[1:]:
- startInstall(pkgList)
+ if not pkgList:
+ sys.exit("\n" + "Nothing to install, please give at least one package name; quitting" + "\n")
+ else:
+ startInstall(pkgList)
elif "uninstall" in sys.argv[1:]:
- startUninstall(pkgList)
+ if not pkgList:
+ sys.exit("\n" + "Nothing to uninstall, please give at least one package name; quitting" + "\n")
+ else:
+ startUninstall(pkgList)
elif "force-uninstall" in sys.argv[1:]:
- startUninstallForce(pkgList)
+ if not pkgList:
+ sys.exit("\n" + "Nothing to force uninstall, please give at least one package name; quitting" + "\n")
+ else:
+ startUninstallForce(pkgList)
elif "remove-orphans" in sys.argv[1:]:
removeOrphans()
elif "update" in sys.argv[1:]:
@@ -20,7 +29,10 @@ if "__main__" == __name__:
elif "upgrade" in sys.argv[1:]:
startUpgrade()
elif "search" in sys.argv[1:]:
- startSearch(pkgList)
+ if not pkgList:
+ sys.exit("\n" + "Nothing to search, please give at least one package name; quitting" + "\n")
+ else:
+ startSearch(pkgList)
elif "spmsync" in sys.argv[1:]:
startSyncSPM()
elif "rescue" in sys.argv[1:]: