"sync"
"github.com/Sirupsen/logrus"
- "github.com/iotbzh/xds-server/lib/common"
+ common "github.com/iotbzh/xds-common/golib"
"github.com/iotbzh/xds-server/lib/xdsconfig"
)
sdk, err := NewCrossSDK(d)
if err != nil {
log.Debugf("Error while processing SDK dir=%s, err=%s", d, err.Error())
+ continue
}
s.Sdks = append(s.Sdks, *sdk)
}
}
// GetEnvCmd returns the command used to initialized the environment for an SDK
-func (s *SDKs) GetEnvCmd(id string, defaultID string) string {
+func (s *SDKs) GetEnvCmd(id string, defaultID string) []string {
if id == "" && defaultID == "" {
// no env cmd
- return ""
+ return []string{}
}
s.mutex.Lock()
defer s.mutex.Unlock()
- defaultEnv := ""
+ defaultEnv := []string{}
for _, sdk := range s.Sdks {
if sdk.ID == id {
return sdk.GetEnvCmd()