浏览代码

Merge pull request #507 from Morganamilo/fix#506

Return when no packages are to be installed.
Anna 6 年之前
父节点
当前提交
ae24228aed
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      cmd.go

+ 4 - 0
cmd.go

@@ -556,6 +556,10 @@ func numberMenu(pkgS []string, flags []string) (err error) {
 		}
 	}
 
+	if len(arguments.targets) == 0 {
+		return fmt.Errorf("There is nothing to do")
+	}
+
 	if config.SudoLoop {
 		sudoLoopBackground()
 	}