Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"context"
"fmt"
"internal/goarch"
"net/http"
"net/url"
sysos "os"
Expand Down Expand Up @@ -127,11 +128,22 @@ func (o *downloadOption) fetch() (err error) {
return
}

func (o *downloadOption) archFix() {
if o.Arch != "arm" {
return
}

if goarch.IsArm64 == 1 {
o.Arch = "arm64"
}
}

func (o *downloadOption) preRunE(cmd *cobra.Command, args []string) (err error) {
// this might not be the best way to print schema
if o.PrintSchema {
return
}
o.archFix()

if err = o.fetch(); err != nil {
return
Expand Down