Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 12, 2015
1 parent a004aea commit 5773046
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Paket.Core/PublicAPI.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Dependencies(dependenciesFileName: string) =
let listPackages (packages: System.Collections.Generic.KeyValuePair<GroupName*PackageName, PackageResolver.ResolvedPackage> seq) =
packages
|> Seq.map (fun kv ->
let groupName,packageName = kv.Key
let groupName,packageName = kv.Key
groupName.ToString(),packageName.ToString(),kv.Value.Version.ToString())
|> Seq.toList

Expand All @@ -33,13 +33,13 @@ type Dependencies(dependenciesFileName: string) =
path
else
let parent = dir.Parent
if parent = null then
match parent with
| null ->
if withError then
failwithf "Could not find '%s'. To use Paket with this solution, please run 'paket init' first." Constants.DependenciesFileName
else
Constants.DependenciesFileName
else
findInPath(parent, withError)
| _ -> findInPath(parent, withError)

let dependenciesFileName = findInPath(DirectoryInfo path,true)
verbosefn "found: %s" dependenciesFileName
Expand Down Expand Up @@ -404,7 +404,9 @@ type Dependencies(dependenciesFileName: string) =
let cancellationToken = defaultArg cancellationToken (System.Threading.CancellationToken())
let maxResults = defaultArg maxResults 1000
let sources = this.GetSources() |> Seq.map (fun kv -> kv.Value) |> List.concat |> List.distinct
if sources = [] then [PackageSources.DefaultNugetSource] else sources
match sources with
| [] -> [PackageSources.DefaultNugetSource]
| _ -> sources
|> List.choose (fun x -> match x with | Nuget s -> Some s.Url | _ -> None)
|> Seq.distinct
|> Seq.map (fun url ->
Expand Down

0 comments on commit 5773046

Please sign in to comment.