소스 검색

Abort ealy when there's conflicts with --noconfirm

When using --nouseask, manual intervention is needed to resolve conflicts.
When also useing --noconfirm the install will always fail. So abort
early, before trying to install any AUR packages.
morganamilo 6 년 전
부모
커밋
1d17940ce9
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