diff --git a/Makefile b/Makefile index d0afa40..0e30f1a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ TOOL_NAME = Genesis export EXECUTABLE_NAME = genesis -VERSION = 0.3.0 +VERSION = 0.5.0 PREFIX = /usr/local INSTALL_PATH = $(PREFIX)/bin/$(EXECUTABLE_NAME) diff --git a/Sources/GenesisCLI/GenesisCLI.swift b/Sources/GenesisCLI/GenesisCLI.swift index cfcda2f..b95b97b 100644 --- a/Sources/GenesisCLI/GenesisCLI.swift +++ b/Sources/GenesisCLI/GenesisCLI.swift @@ -3,7 +3,7 @@ import SwiftCLI public class GenesisCLI { - public let version = "0.3.0" + public let version = "0.5.0" let cli: CLI let stream: Streams diff --git a/Sources/GenesisKit/Input.swift b/Sources/GenesisKit/Input.swift index 9d211db..02ba4bd 100644 --- a/Sources/GenesisKit/Input.swift +++ b/Sources/GenesisKit/Input.swift @@ -11,16 +11,16 @@ extension Input { let prompt = "\(prompt)\n\(optionsString)" - let validation = Validation.custom("") { input in + let validation = Validation.custom("") { input in if let index = Int(input), index > 0, index <= options.count { return true } return options.contains(input) } - let errorResponse: InputReader.ErrorResponse = { _,_ in + let errorResponse: InputReader.ErrorResponse = { _, _ in WriteStream.stderr.print("You must respond with one of the following:\n\(optionsString)") } - + let value = Input.readObject(prompt: prompt, secure: false, validation: [validation], errorResponse: errorResponse) if options.contains(value) { return value