From d869b9bd4246227fba48189df7ccf2fec791ccf2 Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Mon, 21 Sep 2015 15:09:36 +0200 Subject: [PATCH] better error in groups --- src/Paket.Core/UpdateProcess.fs | 8 ++++++-- src/Paket/Paket.fsproj | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Paket.Core/UpdateProcess.fs b/src/Paket.Core/UpdateProcess.fs index 72a1f3e91a..03e6649189 100644 --- a/src/Paket.Core/UpdateProcess.fs +++ b/src/Paket.Core/UpdateProcess.fs @@ -120,8 +120,12 @@ let selectiveUpdate resolve (lockFile:LockFile) (dependenciesFile:DependenciesFi let groups = resolution |> Map.map (fun groupName group -> - { Name = dependenciesFile.Groups.[groupName].Name - Options = dependenciesFile.Groups.[groupName].Options + let dependenciesGroup = + match dependenciesFile.Groups |> Map.tryFind groupName with + | Some g -> g + | None -> failwithf "Group %O was not found in paket.dependencies." groupName + { Name = dependenciesGroup.Name + Options = dependenciesGroup.Options Resolution = group.ResolvedPackages.GetModelOrFail() RemoteFiles = group.ResolvedSourceFiles }) diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index 5be6222dfd..48d6173856 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -34,11 +34,11 @@ c:\code\Paket09x D:\code\Pakettest D:\code\Paketkopie - update + update nuget stidgen Project paket.exe c:\code\Paketkopie - d:\code\paketkopie + d:\code\PaketRepro pdbonly