Skip to content

Commit

Permalink
Merge pull request #9 from cats-oss/allow-some-errors
Browse files Browse the repository at this point in the history
Allow Pods or Carthage directory not found
  • Loading branch information
ra1028 authored Jul 10, 2019
2 parents 3a7fba3 + 8e1c042 commit 9fa2180
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
6 changes: 1 addition & 5 deletions Sources/AcknowledgementsPlist/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ let main = command(Argument<String>("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:
Expand Down
2 changes: 0 additions & 2 deletions Sources/AcknowledgementsPlistCore/Common/AckError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import Foundation
public enum AckError: Error {
case projectRootPath
case convertedURL
case podsDirURL
case carthageDirURL
case emptyLicenseURLs
case manualAckPlist
case manualACKPref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 9fa2180

Please sign in to comment.