fall back to any architecture when getting plugin's checksum #30034 (#30035)

* fall back to any architecture when getting plugin's checksum

* Update pkg/cmd/grafana-cli/commands/install_command.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* remove typo

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
ying-jeanne 2021-01-05 14:26:48 +01:00 committed by GitHub
parent 682d833eda
commit 2a734c2040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,11 @@ func InstallPlugin(pluginName, version string, c utils.CommandLine, client utils
// Plugins which are downloaded just as sourcecode zipball from github do not have checksum
if v.Arch != nil {
checksum = v.Arch[osAndArchString()].SHA256
archMeta, exists := v.Arch[osAndArchString()]
if !exists {
archMeta = v.Arch["any"]
}
checksum = archMeta.SHA256
}
}