                         }
 
                         self.callbacksQueue.async {
-                            self.delegate.handleWillUpdate(handle: handle)
+                            self.delegate?.handleWillUpdate(handle: handle)
                         }
 
                         try repo.fetch()
 
                         self.callbacksQueue.async {
-                            self.delegate.handleDidUpdate(handle: handle)
+                            self.delegate?.handleDidUpdate(handle: handle)
                         }
 
                         return handle

    public init(
        path: AbsolutePath,
        provider: RepositoryProvider,
        delegate: RepositoryManagerDelegate,
        fileSystem: FileSystem = localFileSystem
    ) {
        self.path = path

    public let provider: RepositoryProvider

    /// The delegate interface.
    private let delegate: RepositoryManagerDelegate?

    /// The map of registered repositories.
    //
