From 0f356b49010da85e99bb2d163bafa7d7ed202b73 Mon Sep 17 00:00:00 2001 From: Yvonnick Esnault Date: Thu, 4 Mar 2021 09:51:45 +0100 Subject: [PATCH] fix(engine): download - check config (#5727) close #5716 Signed-off-by: Yvonnick Esnault --- engine/cmd_download.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/cmd_download.go b/engine/cmd_download.go index 08addb1f69..3035c554ce 100644 --- a/engine/cmd_download.go +++ b/engine/cmd_download.go @@ -78,6 +78,9 @@ var downloadUICmd = &cobra.Command{ if conf.API == nil { sdk.Exit("Invalid configuration file") } + if conf.UI == nil { + sdk.Exit("Invalid configuration file - missing ui section") + } downloadTarGzFromGithub(conf.UI.Staticdir, "ui.tar.gz") }, } @@ -92,6 +95,9 @@ var downloadSQLCmd = &cobra.Command{ if conf.API == nil { sdk.Exit("Invalid configuration file") } + if conf.DatabaseMigrate == nil { + sdk.Exit("Invalid configuration file - missing databaseMigrate section") + } downloadTarGzFromGithub(conf.DatabaseMigrate.Directory, "sql.tar.gz") }, }