This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch f
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git

commit be7e8cc62875aaf1e6ba60a0125be939590f0839
Author: kezhenxu94 <kezhenx...@apache.org>
AuthorDate: Mon May 19 15:10:54 2025 +0800

    fix: add cold stage to trace ls....
---
 internal/commands/trace/list.go | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/internal/commands/trace/list.go b/internal/commands/trace/list.go
index 8bfb014..fe738cc 100644
--- a/internal/commands/trace/list.go
+++ b/internal/commands/trace/list.go
@@ -101,13 +101,8 @@ $ swctl trace ls --trace-id 
"321661b1-9a31-4e12-ad64-c8f6711f108d" --cold
                serviceInstanceID := ctx.String("instance-id")
                traceID := ctx.String("trace-id")
                tagStr := ctx.String("tags")
-               cold := ctx.Bool("cold")
 
-               if cold && traceID == "" {
-                       return fmt.Errorf("cold storage must be queried with 
trace-id")
-               }
-
-               if cold {
+               if coldStage && traceID != "" {
                        trace, err := trace.ColdTrace(ctx.Context, duration, 
traceID)
                        if err != nil {
                                return err

Reply via email to