Fixed errcheck issues in server/channels/app/plugin_install.go (#29062)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
Arya Khochare
2024-11-21 16:00:30 +05:30
коммит произвёл GitHub
родитель 5911590ce6
Коммит 45860309b1
3 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@@ -115,7 +115,6 @@ issues:
channels/app/platform/web_conn.go|\
channels/app/platform/web_hub.go|\
channels/app/platform/web_hub_test.go|\
channels/app/plugin_install.go|\
channels/app/plugin_signature_test.go|\
channels/app/plugin_test.go|\
channels/app/post_helpers_test.go|\

Просмотреть файл

@@ -389,7 +389,9 @@ func (ch *Channels) installPluginLocally(bundle io.ReadSeeker, installationStrat
// extractPlugin unpacks the given plugin bundle into the specified directory.
func extractPlugin(bundle io.ReadSeeker, extractDir string) (*model.Manifest, string, *model.AppError) {
bundle.Seek(0, 0)
if _, err := bundle.Seek(0, 0); err != nil {
return nil, "", model.NewAppError("extractPlugin", "app.plugin.seek.app_error", nil, "", http.StatusInternalServerError).Wrap(err)
}
if err := extractTarGz(bundle, extractDir); err != nil {
return nil, "", model.NewAppError("extractPlugin", "app.plugin.extract.app_error", nil, "", http.StatusBadRequest).Wrap(err)
}

Просмотреть файл

@@ -6154,6 +6154,10 @@
"id": "app.plugin.restart.app_error",
"translation": "Unable to restart plugin on upgrade."
},
{
"id": "app.plugin.seek.app_error",
"translation": "Unable to reset the read position to the start of the plugin bundle."
},
{
"id": "app.plugin.signature_decode.app_error",
"translation": "Unable to decode base64 signature."