Updated saveInstalledPackages func
This commit is contained in:
parent
f80f4914ad
commit
66f4191c5f
1 changed files with 10 additions and 0 deletions
|
@ -72,6 +72,16 @@ func saveInstalledPackages(installDir string, pkgs []AppIndexEntry) error {
|
|||
section.Key("V").SetValue(pkg.Version)
|
||||
section.Key("R").SetValue(pkg.Release)
|
||||
section.Key("o").SetValue(pkg.Type)
|
||||
|
||||
// Save arch if different from current runtime architecture
|
||||
if pkg.Arch != runtime.GOARCH {
|
||||
section.Key("A").SetValue(pkg.Arch)
|
||||
}
|
||||
|
||||
// Save OS if different from current runtime OS
|
||||
if pkg.OS != runtime.GOOS {
|
||||
section.Key("p").SetValue(pkg.OS)
|
||||
}
|
||||
}
|
||||
|
||||
return cfg.SaveTo(installedFile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue