summaryrefslogtreecommitdiffstats
path: root/cmd-sdks.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-sdks.go')
-rw-r--r--cmd-sdks.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd-sdks.go b/cmd-sdks.go
index 3fc596f..eeebffa 100644
--- a/cmd-sdks.go
+++ b/cmd-sdks.go
@@ -242,7 +242,7 @@ func sdksInstall(ctx *cli.Context) error {
}
exitChan := make(chan exitResult, 1)
- IOsk.On("disconnection", func(err error) {
+ IOSkClient.On("disconnection", func(err error) {
Log.Debugf("WS disconnection event with err: %v\n", err)
errMsg := ""
if err != nil {
@@ -251,7 +251,7 @@ func sdksInstall(ctx *cli.Context) error {
exitChan <- exitResult{errMsg, 2}
})
- IOsk.On(xaapiv1.EVTSDKManagement, func(ev xaapiv1.EventMsg) {
+ IOSkClient.On(xaapiv1.EVTSDKManagement, func(ev xaapiv1.EventMsg) {
sdkEvt, _ := ev.DecodeSDKMgtMsg()
if sdkEvt.Action != xaapiv1.SdkMgtActionInstall {
@@ -259,11 +259,11 @@ func sdksInstall(ctx *cli.Context) error {
return
}
- if !shortOut && sdkEvt.Stdout != "" {
- fmt.Printf("%s", sdkEvt.Stdout)
+ if !shortOut && len(sdkEvt.Stdout) > 0 {
+ os.Stdout.Write([]byte(sdkEvt.Stdout))
}
- if !shortOut && sdkEvt.Stderr != "" {
- fmt.Fprintf(os.Stderr, "%s", sdkEvt.Stderr)
+ if !shortOut && len(sdkEvt.Stderr) > 0 {
+ os.Stderr.Write([]byte(sdkEvt.Stderr))
}
if sdkEvt.Exited {
@@ -271,7 +271,7 @@ func sdksInstall(ctx *cli.Context) error {
}
})
- IOsk.On(xaapiv1.EVTSDKStateChange, func(ev xaapiv1.EventMsg) {
+ IOSkClient.On(xaapiv1.EVTSDKStateChange, func(ev xaapiv1.EventMsg) {
sdk, _ := ev.DecodeSDKEvent()
Log.Debugf("EVTSDKStateChange: %v", sdk)
})