mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-26 08:43:23 +00:00
Upgrade to go-execute/v2
Upgrades to go-execute/v2 and updates various other dependencies. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
16
vendor/github.com/alexellis/arkade/pkg/env/env.go
generated
vendored
16
vendor/github.com/alexellis/arkade/pkg/env/env.go
generated
vendored
@ -4,26 +4,32 @@
|
||||
package env
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
execute "github.com/alexellis/go-execute/pkg/v1"
|
||||
execute "github.com/alexellis/go-execute/v2"
|
||||
)
|
||||
|
||||
// GetClientArch returns a pair of arch and os
|
||||
func GetClientArch() (arch string, os string) {
|
||||
task := execute.ExecTask{Command: "uname", Args: []string{"-m"}, StreamStdio: false}
|
||||
res, err := task.Execute()
|
||||
task := execute.ExecTask{
|
||||
Command: "uname",
|
||||
Args: []string{"-m"},
|
||||
StreamStdio: false}
|
||||
res, err := task.Execute(context.Background())
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
|
||||
archResult := strings.TrimSpace(res.Stdout)
|
||||
|
||||
taskOS := execute.ExecTask{Command: "uname", Args: []string{"-s"}, StreamStdio: false}
|
||||
resOS, errOS := taskOS.Execute()
|
||||
taskOS := execute.ExecTask{Command: "uname",
|
||||
Args: []string{"-s"},
|
||||
StreamStdio: false}
|
||||
resOS, errOS := taskOS.Execute(context.Background())
|
||||
if errOS != nil {
|
||||
log.Println(errOS)
|
||||
}
|
||||
|
Reference in New Issue
Block a user