From 8e1c04297504a73aa52c68fd8fdcaabdaa287ec9 Mon Sep 17 00:00:00 2001 From: Ryo Aoyama Date: Wed, 10 Jul 2019 21:12:20 +0900 Subject: [PATCH] Allow Pods or Carthage directory not found --- Sources/AcknowledgementsPlist/main.swift | 6 +----- Sources/AcknowledgementsPlistCore/Common/AckError.swift | 2 -- .../Protocols/LicenseURLsMakable.swift | 2 -- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Sources/AcknowledgementsPlist/main.swift b/Sources/AcknowledgementsPlist/main.swift index e22bd17..58e6644 100644 --- a/Sources/AcknowledgementsPlist/main.swift +++ b/Sources/AcknowledgementsPlist/main.swift @@ -37,12 +37,8 @@ let main = command(Argument("project-root-path", description: "Project r print("ProjectRootPath not found.") case .convertedURL: print("It could not be converted to URL.") - case .podsDirURL: - print("Pods directory URL not found.") - case .carthageDirURL: - print("Carthage directory URL not found.") case .emptyLicenseURLs: - print("Pods and Carthage URLs is impty.") + print("Pods or Carthage directory is impty.") case .manualAckPlist: print("ManualAcknowledgements.plist not found.") case .manualACKPref: diff --git a/Sources/AcknowledgementsPlistCore/Common/AckError.swift b/Sources/AcknowledgementsPlistCore/Common/AckError.swift index 549cfb6..cb62e87 100644 --- a/Sources/AcknowledgementsPlistCore/Common/AckError.swift +++ b/Sources/AcknowledgementsPlistCore/Common/AckError.swift @@ -10,8 +10,6 @@ import Foundation public enum AckError: Error { case projectRootPath case convertedURL - case podsDirURL - case carthageDirURL case emptyLicenseURLs case manualAckPlist case manualACKPref diff --git a/Sources/AcknowledgementsPlistCore/Protocols/LicenseURLsMakable.swift b/Sources/AcknowledgementsPlistCore/Protocols/LicenseURLsMakable.swift index ccafacd..7d7b5fc 100644 --- a/Sources/AcknowledgementsPlistCore/Protocols/LicenseURLsMakable.swift +++ b/Sources/AcknowledgementsPlistCore/Protocols/LicenseURLsMakable.swift @@ -37,7 +37,6 @@ extension LicenseURLsMakable { let isNotContainCarthageStrComponents = !url.path.localizedCaseInsensitiveContains("carthage") return isLastPathPodsStr && isContainOnePodsStr && isNotContainCarthageStrComponents } - if podsDirURLs.count != 1 { throw AckError.podsDirURL } podsDirURL = podsDirURLs.first } else { podsDirURL = URL(string: options.podsPath) @@ -57,7 +56,6 @@ extension LicenseURLsMakable { let isNotContainPodsStrComponents = !url.path.localizedCaseInsensitiveContains("pods") return isLastPathCheckoutsStr && isContainOneCarthageStr && isContainOneCheckoutsStr && isNotContainPodsStrComponents } - if carthageCheckoutsDirURLs.count != 1 { throw AckError.carthageDirURL } carthageCheckoutsDirURL = carthageCheckoutsDirURLs.first } else { carthageCheckoutsDirURL = URL(string: options.carthageCheckoutsPath)