mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
refactor: reduce flow-control operations
Signed-off-by: Jesse Simpson <jesse.simpson36@gmail.com>
This commit is contained in:
parent
48922e21d1
commit
868cdc261f
1 changed files with 2 additions and 7 deletions
|
|
@ -397,14 +397,9 @@ func reformatExecErrorMsg(filename string, err error) error {
|
|||
} else {
|
||||
return err
|
||||
}
|
||||
if len(fileLocations) > 0 {
|
||||
lastErr := fileLocations[len(fileLocations)-1]
|
||||
if lastErr == traceable {
|
||||
current = errors.Unwrap(current)
|
||||
continue
|
||||
}
|
||||
if len(fileLocations) == 0 || fileLocations[len(fileLocations)-1] != traceable {
|
||||
fileLocations = append(fileLocations, traceable)
|
||||
}
|
||||
fileLocations = append(fileLocations, traceable)
|
||||
current = errors.Unwrap(current)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue