Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow empty string as authors and description metadata #1728

Merged
merged 3 commits into from
Jun 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project

description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ type project
id PaketBug
description
Silly empty demo project
authors Paket team
files
paket.references => content/net45+net451
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug2
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug2
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug2
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ type project
id PaketBug2
description
Silly empty demo project
authors Paket team
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
type project
description Test project.
authors Paket team
licenseUrl http://opensource.org/licenses/MIT
4 changes: 2 additions & 2 deletions src/Paket.Core/PackageMetaData.fs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ let getVersion versionFromAssembly attributes =

let getAuthors attributes =
attributes
|> Seq.tryPick (function Company a -> Some a | _ -> None)
|> Option.map (fun a ->
|> Seq.tryPick (function Company a when notNullOrEmpty a -> Some a | _ -> None)
|> Option.map (fun a ->
a.Split(',')
|> Array.map (fun s -> s.Trim())
|> List.ofArray)
Expand Down
2 changes: 1 addition & 1 deletion src/Paket.Core/PackageProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ let private merge buildConfig buildPlatform versionFromAssembly specificVersions
[ if merged.Id = None then yield "Id"
if merged.Version = None then yield "Version"
if merged.Authors = None || merged.Authors = Some [] then yield "Authors"
if merged.Description = None then yield "Description" ]
if merged.Description = None || merged.Description = Some "" then yield "Description" ]
|> fun xs -> String.Join(", ",xs)

failwithf
Expand Down