浏览代码

Merge pull request #571 from Morganamilo/abort-conflict

Abort ealy when there's conflicts with --noconfirm
Anna 6 年之前
父节点
当前提交
0e5cd51910
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      depCheck.go

+ 4 - 0
depCheck.go

@@ -180,6 +180,10 @@ func (dp *depPool) CheckConflicts() (mapStringSet, error) {
 		}
 
 		fmt.Println()
+
+		if config.NoConfirm && !config.UseAsk {
+			return nil, fmt.Errorf("Package conflicts can not be resolved with noconfirm, aborting")
+		}
 	}
 
 	return conflicts, nil