Skip to content

Commit 36fd90e

Browse files
authored
fix: the flag of arch not work well (#317)
1 parent 5162176 commit 36fd90e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/installer/check.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,16 @@ func (o *Installer) ProviderURLParse(path string, acceptPreRelease bool) (packag
184184
if data, err = ioutil.ReadFile(matchedFile); err == nil {
185185
cfg := HDConfig{}
186186
if !IsSupport(cfg) {
187-
err = fmt.Errorf("not support this platform, os: %s, arch: %s", runtime.GOOS, runtime.GOARCH)
187+
err = fmt.Errorf("not support this platform, os: %s, arch: %s", o.OS, o.Arch)
188188
return
189189
}
190190

191191
if err = yaml.Unmarshal(data, &cfg); err == nil {
192192
hdPkg := &HDPackage{
193193
Name: o.Name,
194194
Version: version,
195-
OS: common.GetReplacement(runtime.GOOS, cfg.Replacements),
196-
Arch: common.GetReplacement(runtime.GOARCH, cfg.Replacements),
195+
OS: common.GetReplacement(o.OS, cfg.Replacements),
196+
Arch: common.GetReplacement(o.Arch, cfg.Replacements),
197197
AdditionBinaries: cfg.AdditionBinaries,
198198
VersionNum: strings.TrimPrefix(version, "v"),
199199
}

0 commit comments

Comments
 (0)