Eliminate "fatal" from basic error messages
The word "fatal" makes it look like Coconut did something wrong, when in fact, these messages are used to convey mis-usage of the command/argument/etc.
This commit is contained in:
parent
95f59273c8
commit
fe1a32c086
2 changed files with 2 additions and 5 deletions
|
@ -71,9 +71,6 @@ func runFunc(run func(cmd *cobra.Command, args []string) error) func(*cobra.Comm
|
|||
}
|
||||
}
|
||||
|
||||
// exitErrorPrefix is auto-appended to any abrupt command exit.
|
||||
const exitErrorPrefix = "fatal: "
|
||||
|
||||
// exitError issues an error and exits with a standard error exit code.
|
||||
func exitError(msg string, args ...interface{}) {
|
||||
exitErrorCode(-1, msg, args...)
|
||||
|
@ -81,6 +78,6 @@ func exitError(msg string, args ...interface{}) {
|
|||
|
||||
// exitErrorCode issues an error and exists with the given error exit code.
|
||||
func exitErrorCode(code int, msg string, args ...interface{}) {
|
||||
sink().Errorf(diag.Message(exitErrorPrefix + fmt.Sprintf(msg, args...)))
|
||||
sink().Errorf(diag.Message(fmt.Sprintf(msg, args...)))
|
||||
os.Exit(code)
|
||||
}
|
||||
|
|
|
@ -315,7 +315,7 @@ func apply(cmd *cobra.Command, info *envCmdInfo, opts applyOptions) {
|
|||
|
||||
if progress.MaybeCorrupt {
|
||||
summary.WriteString(fmt.Sprintf(
|
||||
"%vfatal: A catastrophic error occurred; resources states may be unknown%v\n",
|
||||
"%vA catastrophic error occurred; resources states may be unknown%v\n",
|
||||
colors.SpecAttention, colors.Reset))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue