From 70d4c1b2c575e5decd0652d1ed65a2a235c2bcdc Mon Sep 17 00:00:00 2001 From: Joshua Clanton Date: Thu, 1 Dec 2022 15:06:16 -0500 Subject: [PATCH] Allow `UNLICENSED` in `ahkpm init`, and add clarifying wording (#187) --- src/core/initializer.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/initializer.go b/src/core/initializer.go index 4e1a9a8..ce947f5 100644 --- a/src/core/initializer.go +++ b/src/core/initializer.go @@ -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), )