mirror of
https://github.com/rancher/os.git
synced 2025-09-16 23:21:19 +00:00
Throw error if running install / upgrade on non-amd64
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@@ -84,6 +85,10 @@ var installCommand = cli.Command{
|
||||
}
|
||||
|
||||
func installAction(c *cli.Context) error {
|
||||
if runtime.GOARCH != "amd64" {
|
||||
log.Fatalf("ros install / upgrade only supported on 'amd64', not '%s'", runtime.GOARCH)
|
||||
}
|
||||
|
||||
if c.Args().Present() {
|
||||
log.Fatalf("invalid arguments %v", c.Args())
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
@@ -167,6 +168,10 @@ func getLatestImage() (string, error) {
|
||||
}
|
||||
|
||||
func osUpgrade(c *cli.Context) error {
|
||||
if runtime.GOARCH != "amd64" {
|
||||
log.Fatalf("ros install / upgrade only supported on 'amd64', not '%s'", runtime.GOARCH)
|
||||
}
|
||||
|
||||
image := c.String("image")
|
||||
|
||||
if image == "" {
|
||||
|
Reference in New Issue
Block a user