Skip to content

Commit

Permalink
Do not touch project files in packages folder - references #1455
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Feb 4, 2016
1 parent 408345b commit bb1d3d3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 2.49.3 - 04.02.2016
* BUGFIX: Do not touch project files in packages folder - https://github.com/fsprojects/Paket/issues/1455

#### 2.49.2 - 04.02.2016
* BUGFIX: Keep versions locked for dependencies during pack - https://github.com/fsprojects/Paket/issues/1457

Expand Down
16 changes: 14 additions & 2 deletions src/Paket.Core/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,25 @@ module ProjectFile =
| _ -> None

/// Finds all project files
let findAllProjects folder =
let findAllProjects folder =
let packagesPath = Path.Combine(folder,Constants.PackagesFolderName) |> normalizePath
let paketPath = Path.Combine(folder,Constants.PaketFilesFolderName) |> normalizePath

let findAllFiles (folder, pattern) =
let rec search (di:DirectoryInfo) =
try
let files = di.GetFiles(pattern, SearchOption.TopDirectoryOnly)
di.GetDirectories()
|> Array.filter (fun di -> try Path.Combine(di.FullName, Constants.DependenciesFileName) |> File.Exists |> not with | _ -> false)
|> Array.filter (fun di ->
try
let path = di.FullName |> normalizePath
if path = packagesPath then false else
if path = paketPath then false else
Path.Combine(path, Constants.DependenciesFileName)
|> File.Exists
|> not
with
| _ -> false)
|> Array.collect search
|> Array.append files
with
Expand Down

0 comments on commit bb1d3d3

Please sign in to comment.