refactor: rename display exit code

This commit is contained in:
Jan De Dobbeleer 2020-09-30 11:18:35 +02:00 committed by Jan De Dobbeleer
parent c0aa27a342
commit 71c610aaa8
7 changed files with 9 additions and 9 deletions

View file

@ -92,7 +92,7 @@
"trailing_diamond": "",
"properties": {
"error_icon": "",
"display_error_code": false,
"display_exit_code": false,
"always_enabled": true,
"error_color": "#e91e63",
"color_background": true,

View file

@ -37,7 +37,7 @@
"foreground": "#DCB977",
"properties": {
"error_icon": "✗",
"display_error_code": false
"display_exit_code": false
}
},
{

View file

@ -38,7 +38,7 @@
"foreground": "#DCB977",
"properties": {
"error_icon": "✗",
"display_error_code": false
"display_exit_code": false
}
}
]

View file

@ -96,7 +96,7 @@
"error_icon": "",
"always_enabled": true,
"error_color": "#FF5252",
"display_error_code": false
"display_exit_code": false
}
}
]

View file

@ -38,7 +38,7 @@
"foreground": "#DCB977",
"properties": {
"error_icon": "✗",
"display_error_code": false
"display_exit_code": false
}
}
]

View file

@ -50,7 +50,7 @@
"foreground": "#DCB977",
"properties": {
"error_icon": "✗",
"display_error_code": false,
"display_exit_code": false,
"postfix": ""
}
}

View file

@ -10,8 +10,8 @@ type exit struct {
const (
//ErrorIcon represents icon to display in case of error
ErrorIcon Property = "error_icon"
//DisplayErrorCode shows or hides the error code
DisplayErrorCode Property = "display_error_code"
//DisplayExitCode shows or hides the error code
DisplayExitCode Property = "display_exit_code"
//AlwaysEnabled decides whether or not to always display the exitcode info
AlwaysEnabled Property = "always_enabled"
//ErrorColor specify a different foreground color for the error text when using always_show = true
@ -48,7 +48,7 @@ func (e *exit) getFormattedText() string {
}
func (e *exit) getMeaningFromExitCode() string {
if !e.props.getBool(DisplayErrorCode, true) {
if !e.props.getBool(DisplayExitCode, true) {
return ""
}
switch e.env.lastErrorCode() {