Skip to content

Commit

Permalink
Merge pull request #922 from kerams/paket-#895
Browse files Browse the repository at this point in the history
Make --force install/update/restore remote files too
  • Loading branch information
forki committed Jul 13, 2015
2 parents 12c82b0 + ab99bbd commit e0ae1e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Paket.Core/InstallProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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<NormalizedPackageName>) =
let sourceFileDownloads = RemoteDownload.DownloadSourceFiles(root, lockFile.SourceFiles)
let sourceFileDownloads = RemoteDownload.DownloadSourceFiles(root, force, lockFile.SourceFiles)

let packageDownloads =
lockFile.ResolvedPackages
Expand Down
4 changes: 2 additions & 2 deletions src/Paket.Core/RemoteDownload.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Core/RestoreProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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<NormalizedPackageName>) =
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
Expand Down

0 comments on commit e0ae1e4

Please sign in to comment.