Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ac5c17

Browse files
committed
always print traec
1 parent4066e2c commit2ac5c17

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

‎cli/root.go‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,10 +1109,7 @@ func formatMultiError(from string, multi []error, opts *formatOpts) string {
11091109

11101110
// Write errors out
11111111
varstr strings.Builder
1112-
vartraceMsgstring
1113-
ifopts.Verbose {
1114-
traceMsg=fmt.Sprintf("Trace=[%s])",from)
1115-
}
1112+
traceMsg:=fmt.Sprintf("Trace=[%s])",from)
11161113
_,_=str.WriteString(pretty.Sprint(headLineStyle(),fmt.Sprintf("%d errors encountered: %s",len(multi),traceMsg)))
11171114
fori,errStr:=rangeerrorStrings {
11181115
// Indent each error
@@ -1160,11 +1157,10 @@ func formatCoderSDKError(from string, err *codersdk.Error, opts *formatOpts) str
11601157
ifopts.Verbose {
11611158
_,_=str.WriteString(pretty.Sprint(headLineStyle(),fmt.Sprintf("API request error to\"%s:%s\". Status code %d",err.Method(),err.URL(),err.StatusCode())))
11621159
_,_=str.WriteString("\n")
1163-
iffrom!="" {
1164-
_,_=str.WriteString(pretty.Sprint(headLineStyle(),fmt.Sprintf("Trace=[%s]",from)))
1165-
_,_=str.WriteString("\n")
1166-
}
11671160
}
1161+
// Always include this trace. Users can ignore this.
1162+
_,_=str.WriteString(pretty.Sprint(headLineStyle(),fmt.Sprintf("Trace=[%s]",from)))
1163+
_,_=str.WriteString("\n")
11681164

11691165
_,_=str.WriteString(pretty.Sprint(headLineStyle(),err.Message))
11701166
iferr.Helper!="" {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp