Skip to content

Commit af977d4

Browse files
committed
Return nil on program action if an error occurred
1 parent adfa4a2 commit af977d4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: commands/upload/upload.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func Upload(ctx context.Context, req *rpc.UploadRequest, outStream io.Writer, er
5353

5454
pm := commands.GetPackageManager(req.GetInstance().GetId())
5555

56-
return &rpc.UploadResponse{}, runProgramAction(
56+
if err := runProgramAction(
5757
pm,
5858
sk,
5959
req.GetImportFile(),
@@ -67,7 +67,11 @@ func Upload(ctx context.Context, req *rpc.UploadRequest, outStream io.Writer, er
6767
outStream,
6868
errStream,
6969
req.GetDryRun(),
70-
)
70+
); err != nil {
71+
return nil, err
72+
}
73+
74+
return &rpc.UploadResponse{}, nil
7175
}
7276

7377
// UsingProgrammer FIXMEDOC

0 commit comments

Comments
 (0)