Skip to content

Commit 3cfca1a

Browse files
Fix project directory path
1 parent 8c6fc74 commit 3cfca1a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/CartingCore/Services/ProjectService.swift

+2-5
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ public final class ProjectService {
1919
static let carthageScript = "/usr/local/bin/carthage copy-frameworks"
2020
}
2121

22-
public let projectDirectoryPath: String
22+
public let projectDirectoryPath: String?
2323

2424
private var projectFolder: Folder {
25-
if let folder = try? Folder(path: projectDirectoryPath) {
25+
if let path = projectDirectoryPath, let folder = try? Folder(path: path) {
2626
return folder
2727
}
2828
return FileSystem().currentFolder
@@ -31,9 +31,6 @@ public final class ProjectService {
3131
// MARK: - Lifecycle
3232

3333
public init(projectDirectoryPath: String?) throws {
34-
guard let projectDirectoryPath = projectDirectoryPath else {
35-
throw Error.projectFileReadingFailed
36-
}
3734
self.projectDirectoryPath = projectDirectoryPath
3835
}
3936

0 commit comments

Comments
 (0)