From 12e07f3cf9042cfc0620ac065db269d611d803fd Mon Sep 17 00:00:00 2001 From: Ashish Tiwari Date: Fri, 17 Feb 2023 13:15:15 +0530 Subject: [PATCH] Fix failing adapter Signed-off-by: Ashish Tiwari --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index 21cd9d5..cf6c247 100644 --- a/main.go +++ b/main.go @@ -42,6 +42,14 @@ var ( instanceID = uuid.NewString() ) +func init() { + // Create the config path if it doesn't exists as the entire adapter + // expects that directory to exists, which may or may not be true + if err := os.MkdirAll(path.Join(config.RootPath(), "bin"), 0750); err != nil { + fmt.Println(err) + os.Exit(1) + } +} func main() { log, err := logger.New(serviceName, logger.Options{Format: logger.SyslogLogFormat, DebugLevel: isDebug()}) if err != nil {