diff --git a/src/Paket.Core/InstallProcess.fs b/src/Paket.Core/InstallProcess.fs index 29b51aadc7..e5c915e149 100644 --- a/src/Paket.Core/InstallProcess.fs +++ b/src/Paket.Core/InstallProcess.fs @@ -96,7 +96,7 @@ let CreateInstallModel(root, sources, force, package) = /// Restores the given packages from the lock file. let createModel(root, sources, force, lockFile : LockFile, packages:Set) = - let sourceFileDownloads = RemoteDownload.DownloadSourceFiles(root, lockFile.SourceFiles) + let sourceFileDownloads = RemoteDownload.DownloadSourceFiles(root, force, lockFile.SourceFiles) let packageDownloads = lockFile.ResolvedPackages diff --git a/src/Paket.Core/RemoteDownload.fs b/src/Paket.Core/RemoteDownload.fs index 65e059c59e..3496b471ff 100644 --- a/src/Paket.Core/RemoteDownload.fs +++ b/src/Paket.Core/RemoteDownload.fs @@ -125,7 +125,7 @@ let downloadRemoteFiles(remoteFile:ResolvedSourceFile,destination) = async { | _ -> ignore() } -let DownloadSourceFiles(rootPath, sourceFiles:ModuleResolver.ResolvedSourceFile list) = +let DownloadSourceFiles(rootPath, force, sourceFiles:ModuleResolver.ResolvedSourceFile list) = sourceFiles |> Seq.map (fun source -> let destination = source.FilePath(rootPath) @@ -155,7 +155,7 @@ let DownloadSourceFiles(rootPath, sourceFiles:ModuleResolver.ResolvedSourceFile else File.Exists destination - if exists then + if not force && exists then verbosefn "Sourcefile %s is already there." (source.ToString()) else tracefn "Downloading %s to %s" (source.ToString()) destination diff --git a/src/Paket.Core/RestoreProcess.fs b/src/Paket.Core/RestoreProcess.fs index c087bd7f7e..ad8427e980 100644 --- a/src/Paket.Core/RestoreProcess.fs +++ b/src/Paket.Core/RestoreProcess.fs @@ -40,7 +40,7 @@ let ExtractPackage(root, sources, force, package : ResolvedPackage) = /// Restores the given dependencies from the lock file. let internal restore(root, sources, force, lockFile:LockFile, packages:Set) = - let sourceFileDownloads = RemoteDownload.DownloadSourceFiles(Path.GetDirectoryName lockFile.FileName, lockFile.SourceFiles) + let sourceFileDownloads = RemoteDownload.DownloadSourceFiles(Path.GetDirectoryName lockFile.FileName, force, lockFile.SourceFiles) let packageDownloads = lockFile.ResolvedPackages