@@ -216,8 +216,8 @@ func (d *Devbox) Shell(ctx context.Context) error {
216
216
return shell .Run ()
217
217
}
218
218
219
- func (d * Devbox ) RunScript (cmdName string , cmdArgs []string ) error {
220
- ctx , task := trace .NewTask (context . Background () , "devboxRun" )
219
+ func (d * Devbox ) RunScript (ctx context. Context , cmdName string , cmdArgs []string ) error {
220
+ ctx , task := trace .NewTask (ctx , "devboxRun" )
221
221
defer task .End ()
222
222
223
223
if err := d .ensurePackagesAreInstalled (ctx , ensure ); err != nil {
@@ -478,7 +478,7 @@ func (d *Devbox) Services() (services.Services, error) {
478
478
479
479
func (d * Devbox ) StartServices (ctx context.Context , serviceNames ... string ) error {
480
480
if ! d .IsEnvEnabled () {
481
- return d .RunScript ("devbox" , append ([]string {"services" , "start" }, serviceNames ... ))
481
+ return d .RunScript (ctx , "devbox" , append ([]string {"services" , "start" }, serviceNames ... ))
482
482
}
483
483
484
484
if ! services .ProcessManagerIsRunning (d .projectDir ) {
@@ -520,7 +520,7 @@ func (d *Devbox) StopServices(ctx context.Context, allProjects bool, serviceName
520
520
if allProjects {
521
521
args = append (args , "--all-projects" )
522
522
}
523
- return d .RunScript ("devbox" , args )
523
+ return d .RunScript (ctx , "devbox" , args )
524
524
}
525
525
526
526
if allProjects {
@@ -554,7 +554,7 @@ func (d *Devbox) StopServices(ctx context.Context, allProjects bool, serviceName
554
554
555
555
func (d * Devbox ) ListServices (ctx context.Context ) error {
556
556
if ! d .IsEnvEnabled () {
557
- return d .RunScript ("devbox" , []string {"services" , "ls" })
557
+ return d .RunScript (ctx , "devbox" , []string {"services" , "ls" })
558
558
}
559
559
560
560
svcSet , err := d .Services ()
@@ -592,7 +592,7 @@ func (d *Devbox) ListServices(ctx context.Context) error {
592
592
593
593
func (d * Devbox ) RestartServices (ctx context.Context , serviceNames ... string ) error {
594
594
if ! d .IsEnvEnabled () {
595
- return d .RunScript ("devbox" , append ([]string {"services" , "restart" }, serviceNames ... ))
595
+ return d .RunScript (ctx , "devbox" , append ([]string {"services" , "restart" }, serviceNames ... ))
596
596
}
597
597
598
598
if ! services .ProcessManagerIsRunning (d .projectDir ) {
@@ -666,7 +666,7 @@ func (d *Devbox) StartProcessManager(
666
666
if background {
667
667
args = append (args , "--background" )
668
668
}
669
- return d .RunScript ("devbox" , args )
669
+ return d .RunScript (ctx , "devbox" , args )
670
670
}
671
671
672
672
// Start the process manager
0 commit comments