build-env: unable to exit from deps

This commit is contained in:
Andrew Jackson (Ajax) 2023-12-11 23:15:41 -06:00
parent 0175faf5c2
commit a478b734fd
3 changed files with 11 additions and 10 deletions

View File

@ -106,10 +106,6 @@ const (
)
func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, makeRepo bool) error {
if deps == nil {
*deps = Deps{}
}
var err error
if makeRepo {
// Open repo
@ -242,6 +238,7 @@ Get it with: jq .PrivateKey ~/.lotus-miner/keystore/MF2XI2BNNJ3XILLQOJUXMYLUMU`,
deps.Maddrs = append(deps.Maddrs, dtypes.MinerAddress(addr))
}
}
fmt.Println("last line of populate")
return nil
}

View File

@ -5,7 +5,7 @@ import (
"fmt"
"os"
"os/signal"
"runtime/debug"
"runtime/pprof"
"syscall"
"github.com/fatih/color"
@ -29,8 +29,8 @@ func SetupCloseHandler() {
go func() {
<-c
fmt.Println("\r- Ctrl+C pressed in Terminal")
debug.PrintStack()
os.Exit(1)
pprof.Lookup("goroutine").WriteTo(os.Stdout, 1)
panic(1)
}()
}

View File

@ -113,14 +113,18 @@ var runCmd = &cli.Command{
}
}
var deps deps.Deps
err = deps.PopulateRemainingDeps(ctx, cctx, true)
fmt.Println("before populateRemainingDeps")
dependencies := &deps.Deps{}
err = dependencies.PopulateRemainingDeps(ctx, cctx, true)
fmt.Println("after popdeps")
if err != nil {
fmt.Println("err", err)
return err
}
dependencies := &deps
fmt.Println("ef")
taskEngine, err := tasks.StartTasks(ctx, dependencies)
fmt.Println("gh")
if err != nil {
return nil