Skip to content

Commit

Permalink
load scripts should only work on lock file - fixes #2372
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 10, 2017
1 parent f385e35 commit cb8da87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Paket.Core/Installation/UpdateProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ let SelectiveUpdate(dependenciesFile : DependenciesFile, alternativeProjectRoot,
lockFile,hasChanged,updatedGroups

/// Smart install command
let SmartInstall(dependenciesFile, updateMode, options : UpdaterOptions) =
let SmartInstall(dependenciesFile:DependenciesFile, updateMode, options : UpdaterOptions) =
let lockFile,hasChanged,updatedGroups = SelectiveUpdate(dependenciesFile, options.Common.AlternativeProjectRoot, updateMode, options.Common.SemVerUpdateMode, options.Common.Force)

let root = Path.GetDirectoryName dependenciesFile.FileName
Expand Down Expand Up @@ -230,8 +230,8 @@ let SmartInstall(dependenciesFile, updateMode, options : UpdaterOptions) =
|> Seq.map (fun g -> g.Name)
|> Seq.toList

let rootDir = (DirectoryInfo dependenciesFile.RootPath)
let depCache= DependencyCache(dependenciesFile,lockFile)
let rootDir = DirectoryInfo dependenciesFile.RootPath
let depCache= DependencyCache(dependenciesFile.FileName,lockFile)
let scripts = LoadingScripts.ScriptGeneration.constructScriptsFromData depCache groupsToGenerate options.Common.ProvidedFrameworks options.Common.ProvidedScriptTypes
for script in scripts do
script.Save rootDir
Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Core/Packaging/PackageMetaData.fs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ let findDependencies (dependenciesFile : DependenciesFile) config platform (temp
|> List.fold (fun templatefile file -> addFile (toFile config platform file) targetDir templatefile) withDeps

let lockFile =
dependenciesFile.FindLockfile().FullName
dependenciesFile.FindLockFile().FullName
|> LockFile.LoadFrom

let allReferences =
Expand Down
4 changes: 2 additions & 2 deletions src/Paket.Core/PaketConfigFiles/DependenciesFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type DependenciesFile(fileName,groups:Map<GroupName,DependenciesGroup>, textRepr
let transform (dependenciesFile:DependenciesFile) (group:DependenciesGroup) =
let getRestrictionList =
let projectFrameworks = lazy (
let lockFile = dependenciesFile.FindLockfile()
let lockFile = dependenciesFile.FindLockFile()
let dir = (lockFile : FileInfo).DirectoryName
let projects = ProjectFile.FindAllProjects dir
let frameworks = projects |> Array.map ProjectFile.getTargetProfile |> Array.distinct
Expand Down Expand Up @@ -741,7 +741,7 @@ type PaketFiles =

let dependenciesFile = findInPath (directory,true) |> DependenciesFile.ReadFromFile

let file = dependenciesFile.FindLockfile()
let file = dependenciesFile.FindLockFile()
if file.Exists then
let lockFile = file.FullName |> LockFile.LoadFrom
DependenciesAndLock(dependenciesFile, lockFile)
Expand Down

0 comments on commit cb8da87

Please sign in to comment.