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"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -84,6 +85,10 @@ var installCommand = cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func installAction(c *cli.Context) error {
|
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() {
|
if c.Args().Present() {
|
||||||
log.Fatalf("invalid arguments %v", c.Args())
|
log.Fatalf("invalid arguments %v", c.Args())
|
||||||
}
|
}
|
||||||
|
@@ -6,6 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
@@ -167,6 +168,10 @@ func getLatestImage() (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func osUpgrade(c *cli.Context) 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")
|
image := c.String("image")
|
||||||
|
|
||||||
if image == "" {
|
if image == "" {
|
||||||
|
Reference in New Issue
Block a user