Skip to content

Commit fdab4c7

Browse files
authored
refactor: remove context.Background() references from create and deploy (#45)
1 parent 8abbaf0 commit fdab4c7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

cmd/project/create_template.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package project
1616

1717
import (
18-
"context"
1918
"fmt"
2019
"strings"
2120
"time"
@@ -248,7 +247,7 @@ func confirmExternalTemplateSelection(cmd *cobra.Command, clients *shared.Client
248247
return true, nil
249248
}
250249

251-
clients.IO.PrintWarning(context.Background(), style.Sectionf(style.TextSection{
250+
clients.IO.PrintWarning(ctx, style.Sectionf(style.TextSection{
252251
Text: style.Bold("You are trying to use code published by an unknown author"),
253252
Secondary: []string{
254253
"We strongly advise reviewing the source code and dependencies of external",

internal/pkg/platform/deploy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func packageArchive(ctx context.Context, clients *shared.ClientFactory, projectR
228228
}
229229

230230
// Install the project's production dependencies with a timeout in case there are issues
231-
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
231+
ctx, cancel := context.WithTimeout(ctx, 5*time.Minute)
232232
defer cancel()
233233

234234
if _, err := clients.Runtime.InstallProjectDependencies(ctx, tmpDir, clients.HookExecutor, clients.IO, clients.Fs, clients.Os); err != nil {

0 commit comments

Comments
 (0)