Skip to content

Commit 53920f7

Browse files
committed
Better clone error logging
1 parent 9035221 commit 53920f7

File tree

1 file changed

+3
-3
lines changed
  • Sources/PublicModules/PADProjectBuilder/ProjectSetup

1 file changed

+3
-3
lines changed

Sources/PublicModules/PADProjectBuilder/ProjectSetup/Git.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal enum GitError: LocalizedError, Equatable {
1212
var errorDescription: String? {
1313
switch self {
1414
case let .couldNotClone(branchOrTag, repository):
15-
"Could not clone \(repository) @ \(branchOrTag) - Please check the provided information"
15+
"Could not clone \(repository) @ \(branchOrTag) - Please check the debug logs for more information"
1616
}
1717
}
1818
}
@@ -48,8 +48,8 @@ internal struct Git {
4848
let shellOutput = shell.execute(command)
4949
logger?.debug(shellOutput, from: String(describing: Self.self))
5050

51-
let directoryContents = try fileHandler.contentsOfDirectory(atPath: targetDirectoryPath)
52-
guard !directoryContents.isEmpty else {
51+
let directoryContents = try? fileHandler.contentsOfDirectory(atPath: targetDirectoryPath)
52+
guard let directoryContents, !directoryContents.isEmpty else {
5353
throw GitError.couldNotClone(branchOrTag: branchOrTag, repository: repository)
5454
}
5555
}

0 commit comments

Comments
 (0)