Skip to content

Commit

Permalink
Update to 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yonaskolb committed Oct 22, 2021
1 parent 11ace8a commit 434a8a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Sources/GenesisCLI/GenesisCLI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions Sources/GenesisKit/Input.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ extension Input {

let prompt = "\(prompt)\n\(optionsString)"

let validation = Validation<String>.custom("") { input in
let validation = Validation<String>.custom("") { input in
if let index = Int(input), index > 0, index <= options.count {
return true
}
return options.contains(input)
}
let errorResponse: InputReader<String>.ErrorResponse = { _,_ in
let errorResponse: InputReader<String>.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
Expand Down

0 comments on commit 434a8a6

Please sign in to comment.