Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make --force install/update/restore remote files too #922

Merged
merged 1 commit into from
Jul 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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