diff --git a/kable/cmd/printer.go b/kable/cmd/printer.go index 78421b8..33b376c 100644 --- a/kable/cmd/printer.go +++ b/kable/cmd/printer.go @@ -20,9 +20,7 @@ func PrintTable(headers []string, lines ...[]string) { } func PrintError(format string, a ...interface{}) { - if !silent { - fmt.Println(fmt.Errorf(color.RedString("! "+format, a...))) - } + fmt.Println(fmt.Errorf(color.RedString("! "+format, a...))) os.Exit(1) } diff --git a/kable/cmd/renderConcept.go b/kable/cmd/renderConcept.go index 2452be6..f0bc8e1 100644 --- a/kable/cmd/renderConcept.go +++ b/kable/cmd/renderConcept.go @@ -101,7 +101,10 @@ kable render -l . -o out/ } else { PrintError("error parsing existing renderinfo: %s", err) } - } else { + } + + // Ask for values if renderinfo does not exist + if existingRenderInfo { vals := *ri.Values for k, _ := range cpt.Inputs.Mandatory { if _, ok := vals[k]; !ok { @@ -109,11 +112,14 @@ kable render -l . -o out/ } } avs = &vals - } - // Ask for values if renderinfo does not exist or values are outdated - if !existingRenderInfo || outdatedValues { - PrintMsg("No existing render or outdated values detected...") + if outdatedValues { + PrintError("Detected outdated values in renderinfo.json") + } + } else { + if printOnly { + PrintError("Cannot use print mode without preexisting renderinfo.json") + } avs, err = NewInputDialog(cpt.Inputs).RunInputDialog() if err != nil { PrintError("error processing concept inputs: %s", err)