aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-01-09 16:01:19 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-01-09 16:01:19 +0100
commit55976cdcd58ed3311090aeb9d371bff53c49dcc1 (patch)
treee5c61826b2b4eab646eedc18d7b35a0f335a3217 /lib
parent889325999e1755b57631d380a048b365ea26fc37 (diff)
Fixed source env sdk file when file is not set.
Diffstat (limited to 'lib')
-rw-r--r--lib/xdsserver/folder-interface.go3
-rw-r--r--lib/xdsserver/sdk.go4
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/xdsserver/folder-interface.go b/lib/xdsserver/folder-interface.go
index 18cdb54..8fdcdb9 100644
--- a/lib/xdsserver/folder-interface.go
+++ b/lib/xdsserver/folder-interface.go
@@ -19,7 +19,10 @@ package xdsserver
import "gerrit.automotivelinux.org/gerrit/src/xds/xds-server/lib/xsapiv1"
+// FolderEventCBData Data format of FolderEvent events
type FolderEventCBData map[string]interface{}
+
+// FolderEventCB Callback prototype for FolderEvent events
type FolderEventCB func(cfg *xsapiv1.FolderConfig, data *FolderEventCBData)
// IFOLDER Folder interface
diff --git a/lib/xdsserver/sdk.go b/lib/xdsserver/sdk.go
index 90dae19..d5b2b43 100644
--- a/lib/xdsserver/sdk.go
+++ b/lib/xdsserver/sdk.go
@@ -492,5 +492,9 @@ func (s *CrossSDK) Get() *xsapiv1.SDK {
// GetEnvCmd returns the command used to initialized the environment
func (s *CrossSDK) GetEnvCmd() []string {
+ if s.sdk.SetupFile == "" {
+ return []string{}
+ }
return []string{"source", s.sdk.SetupFile}
+
}