Skip to content
Permalink
Browse files

Change StreamStdio to false

Slient the unwanted output as the value will be printed after calling this function

Signed-off-by: wingkwong <wingkwong.code@gmail.com>
  • Loading branch information
wingkwong authored and alexellis committed Feb 1, 2020
1 parent 01e83ba commit 340ab6fea2a6e88b21fbd182c3326f1043ff2be3
Showing with 2 additions and 2 deletions.
  1. +2 −2 pkg/env/env.go
@@ -11,15 +11,15 @@ import (

// GetClientArch returns a pair of arch and os
func GetClientArch() (string, string) {
task := execute.ExecTask{Command: "uname", Args: []string{"-m"}, StreamStdio: true}
task := execute.ExecTask{Command: "uname", Args: []string{"-m"}, StreamStdio: false}
res, err := task.Execute()
if err != nil {
log.Println(err)
}

arch := strings.TrimSpace(res.Stdout)

taskOS := execute.ExecTask{Command: "uname", Args: []string{"-s"}, StreamStdio: true}
taskOS := execute.ExecTask{Command: "uname", Args: []string{"-s"}, StreamStdio: false}
resOS, errOS := taskOS.Execute()
if errOS != nil {
log.Println(errOS)

0 comments on commit 340ab6f

Please sign in to comment.
You can’t perform that action at this time.