diff --git a/newt/cli/build_cmds.go b/newt/cli/build_cmds.go index 309b43455..ce1611536 100644 --- a/newt/cli/build_cmds.go +++ b/newt/cli/build_cmds.go @@ -161,10 +161,12 @@ func buildRunCmd(cmd *cobra.Command, args []string, printShellCmds bool, execute } if err := b.Build(); err != nil { - if b.AppBuilder.GetModifiedRepos() != nil { - util.ErrorMessage(util.VERBOSITY_DEFAULT, - "Warning: Following external repos are modified or missing, which might be causing build errors:\n%v\n", - b.AppBuilder.GetModifiedRepos()) + if b.AppBuilder != nil { + if b.AppBuilder.GetModifiedRepos() != nil { + util.ErrorMessage(util.VERBOSITY_DEFAULT, + "Warning: Following external repos are modified or missing, which might be causing build errors:\n%v\n", + b.AppBuilder.GetModifiedRepos()) + } } NewtUsage(nil, err) }