Skip to content

Commit 4069369

Browse files
author
Bruce Hill
committed
Remove context.TODO() and use real contexts
1 parent cb496e9 commit 4069369

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/cmd/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ func handleBuildsCreate(ctx context.Context, cmd *cli.Command) error {
493493
if cmd.Bool("wait") {
494494
waitGroup := Info("Waiting for latest build to complete...")
495495

496-
build, err = waitForBuildCompletion(context.TODO(), cc.client, build, &waitGroup)
496+
build, err = waitForBuildCompletion(ctx, cc.client, build, &waitGroup)
497497
if err != nil {
498498
return err
499499
}
@@ -503,7 +503,7 @@ func handleBuildsCreate(ctx context.Context, cmd *cli.Command) error {
503503

504504
if shouldPull {
505505
pullGroup := Info("Downloading build outputs...")
506-
if err := pullBuildOutputs(context.TODO(), cc.client, *build, targetPaths, &pullGroup); err != nil {
506+
if err := pullBuildOutputs(ctx, cc.client, *build, targetPaths, &pullGroup); err != nil {
507507
pullGroup.Error("Failed to download outputs: %v", err)
508508
} else {
509509
pullGroup.Success("Successfully downloaded all outputs")

pkg/cmd/dev.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func (m BuildModel) downloadTarget(target stainless.Target) tea.Cmd {
211211
Output: "git",
212212
}
213213
outputRes, err := m.cc.client.Builds.TargetOutputs.Get(
214-
context.TODO(),
214+
m.ctx,
215215
params,
216216
)
217217
if err != nil {

0 commit comments

Comments
 (0)