From 3dba6e9ac6a25c19771595ac0b477536d17a123a Mon Sep 17 00:00:00 2001 From: Joshua Clanton Date: Thu, 1 Dec 2022 15:00:52 -0500 Subject: [PATCH] Allow `UNLICENSED` in `ahkpm init`, and add clarifying wording Related to #181 --- 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), )