Skip to content

Commit

Permalink
Provide explanation for invalid license identifier (haskell#6200)
Browse files Browse the repository at this point in the history
After discussion in #hackage it seemed prudent to add some minimal
explanation of what a valid SPDX identifier might look like in the error
message.
  • Loading branch information
toonn authored Feb 28, 2022
1 parent c46eb51 commit 44c2e1a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,11 @@ licensePrompt flags = getLicense flags $ do

case simpleParsec l of
Nothing -> do
putStrLn "The license must be a valid SPDX expression."
putStrLn ( "The license must be a valid SPDX expression:"
++ "\n - On the SPDX License List: https://spdx.org/licenses/"
++ "\n - NONE, if you do not want to grant any license"
++ "\n - LicenseRef-( alphanumeric | - | . )+"
)
licensePrompt flags
Just l' -> return l'
where
Expand Down

0 comments on commit 44c2e1a

Please sign in to comment.