浏览代码

Prevent misusing --create-portals in sync command

Tulir Asokan 2 年之前
父节点
当前提交
ee26bc6061
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      commands.go

+ 4 - 0
commands.go

@@ -1110,6 +1110,10 @@ func fnSync(ce *WrappedCommandEvent) {
 		ce.Reply("`--contact-avatars` can only be used with `sync contacts`")
 		return
 	}
+	if createPortals && !groups {
+		ce.Reply("`--create-portals` can only be used with `sync groups`")
+		return
+	}
 
 	if appState {
 		for _, name := range appstate.AllPatchNames {