Skip to content

Commit

Permalink
Allow UNLICENSED in ahkpm init, and add clarifying wording (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacc authored Dec 1, 2022
1 parent 6f63b60 commit 70d4c1b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ func (i Initializer) InitInteractively() {
prompt.OptionInitialBufferText(manifest.Include),
)

licenseList := data.GetSpdxLicenseIds()
licenseList = append(licenseList, "UNLICENSED")
manifest.License = showPrompt(
"What license is the package released under? (MIT, Apache, etc.) Must either be a valid SPDX license identifier or \"UNLICENSED\".",
buildValidatorFromList(data.GetSpdxLicenseIds()),
"What license is the package released under? (MIT, Apache, etc.)\n"+
"See https://spdx.org/licenses/ for a list of valid license IDs.\n"+
"If you do not wish to license the package, enter \"UNLICENSED\".",
buildValidatorFromList(licenseList),
prompt.OptionInitialBufferText(manifest.License),
)

Expand Down

0 comments on commit 70d4c1b

Please sign in to comment.