diff options
Diffstat (limited to 'lib/crosssdk')
-rw-r--r-- | lib/crosssdk/sdk.go | 4 | ||||
-rw-r--r-- | lib/crosssdk/sdks.go | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/crosssdk/sdk.go b/lib/crosssdk/sdk.go index 9aeec90..5a5770d 100644 --- a/lib/crosssdk/sdk.go +++ b/lib/crosssdk/sdk.go @@ -48,6 +48,6 @@ func NewCrossSDK(path string) (*SDK, error) { } // GetEnvCmd returns the command used to initialized the environment -func (s *SDK) GetEnvCmd() string { - return ". " + s.EnvFile +func (s *SDK) GetEnvCmd() []string { + return []string{"source", s.EnvFile} } diff --git a/lib/crosssdk/sdks.go b/lib/crosssdk/sdks.go index abfef82..d08afc5 100644 --- a/lib/crosssdk/sdks.go +++ b/lib/crosssdk/sdks.go @@ -71,15 +71,15 @@ func (s *SDKs) Get(id int) 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() |