From cc3e9f42aa28fdbf748323f8182c69f69df29294 Mon Sep 17 00:00:00 2001 From: c9s Date: Sat, 23 Jan 2021 01:01:36 +0800 Subject: [PATCH] cmd: fix build nil check --- pkg/cmd/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go index 3c31e5469..214f0b112 100644 --- a/pkg/cmd/run.go +++ b/pkg/cmd/run.go @@ -253,7 +253,7 @@ func run(cmd *cobra.Command, args []string) error { } // for wrapper binary, we can just run the strategies - if bbgo.IsWrapperBinary || len(userConfig.Build.Imports) == 0 || noCompile { + if bbgo.IsWrapperBinary || (userConfig.Build != nil && len(userConfig.Build.Imports) == 0) || noCompile { userConfig, err = bbgo.Load(configFile, true) if err != nil { return err