                 sharedCacheDirectory: self.sharedCacheDirectory,
                 sharedConfigurationDirectory: self.sharedConfigurationDirectory
             ),
-            mirrors: self.getMirrorsConfig(sharedConfigurationDirectory: self.sharedConfigurationDirectory).mirrors,
-            registries: try self.getRegistriesConfig(sharedConfigurationDirectory: self.sharedConfigurationDirectory).configuration,
+            mirrors: self.getMirrorsConfig().mirrors,
+            registries: try self.getRegistriesConfig().configuration,
             authorizationProvider: self.getAuthorizationProvider(),
             customManifestLoader: self.getManifestLoader(), // FIXME: doe we really need to customize it?
             customRepositoryProvider: provider, // FIXME: doe we really need to customize it?

        return newPath
    }

    func getRegistriesConfig(sharedConfigurationDirectory: AbsolutePath? = nil) throws -> Workspace.Configuration.Registries {
        let localRegistriesFile = try Workspace.DefaultLocations.registriesConfigurationFile(forRootPackage: self.getPackageRoot())

        let sharedConfigurationDirectory = sharedConfigurationDirectory ?? self.sharedConfigurationDirectory
        let sharedRegistriesFile = sharedConfigurationDirectory.map {
            Workspace.DefaultLocations.registriesConfigurationFile(at: $0)
        }


        return try Workspace.DefaultLocations.resolvedVersionsFile(forRootPackage: self.getPackageRoot())
    }

    func getMirrorsConfig() throws -> Workspace.Configuration.Mirrors {
        let sharedMirrorFile = self.sharedConfigurationDirectory.map {
            Workspace.DefaultLocations.mirrorsConfigurationFile(at: $0)
        }
        return try .init(
            localMirrorFile: self.mirrorsConfigFile(),
            sharedMirrorFile: sharedMirrorFile,
