From df551853d5b24845113c6f5ead850368006f36cb Mon Sep 17 00:00:00 2001 From: alingse Date: Sun, 15 Dec 2024 21:33:45 +0800 Subject: [PATCH] fix: check `ws.summaryErr != nil` but return a nil value error `err` Signed-off-by: alingse --- internal/pkg/workspace/workspace.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/workspace/workspace.go b/internal/pkg/workspace/workspace.go index 3815fbfd502..891cc809886 100644 --- a/internal/pkg/workspace/workspace.go +++ b/internal/pkg/workspace/workspace.go @@ -181,7 +181,7 @@ func Create(appName string, fs afero.Fs) (*Workspace, error) { ws.CopilotDirAbs = CopilotDirAbs ws.summary, ws.summaryErr = ws.writeSummary(appName) if ws.summaryErr != nil { - return nil, err + return nil, ws.summaryErr } return ws, nil