Skip to content

Commit

Permalink
Exclude submodules from processing - closes #918
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jul 19, 2015
1 parent 1b6b1db commit 6283f76
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 1.19.7 - 19.07.2015
* BUGFIX: Exclude submodules from processing - https://github.com/fsprojects/Paket/issues/918

#### 1.19.6 - 16.07.2015
* Add new ASP.NET 5.0 monikers - https://github.com/fsprojects/Paket/issues/921

Expand Down
16 changes: 15 additions & 1 deletion src/Paket.Core/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ type ProjectFile =

/// Finds all project files
static member FindAllProjects(folder) =
let FindAllFiles(folder, pattern) =
let rec search (di:DirectoryInfo) =
let files = di.GetFiles(pattern, SearchOption.TopDirectoryOnly)
di.GetDirectories()
|> Array.filter (fun di -> Path.Combine(di.FullName, Constants.DependenciesFileName) |> File.Exists |> not)
|> Array.collect search
|> Array.append files

search <| DirectoryInfo folder

FindAllFiles(folder, "*.*proj")
|> Array.filter (fun f -> f.Extension = ".csproj" || f.Extension = ".fsproj" || f.Extension = ".vbproj")
|> Array.choose (fun fi -> ProjectFile.Load fi.FullName)
Expand Down Expand Up @@ -618,7 +628,11 @@ type ProjectFile =
match doc |> getNode "Project" with
| Some node -> node
| _ -> failwithf "unable to find Project node in file %s" fileName
Some { FileName = fi.FullName; Document = doc; ProjectNode = projectNode; OriginalText = Utils.normalizeXml doc }
Some {
FileName = fi.FullName
Document = doc
ProjectNode = projectNode
OriginalText = Utils.normalizeXml doc }
with
| exn ->
traceWarnfn "Unable to parse %s:%s %s" fileName Environment.NewLine exn.Message
Expand Down

0 comments on commit 6283f76

Please sign in to comment.