pkg/cmd: Check errors (#19700)

* pkg/cmd: Check errors
* pkg/cmd: Make sure server waits on services, even in case of error
* pkg/cmd: Inform of error to show help
* pkg/cmd: Only warn on failure to send systemd notification
* pkg/cmd: Don't log errors stemming from context cancelation
* pkg/cmd: Don't fail if unable to write to systemd
This commit is contained in:
Arve Knudsen
2019-10-15 16:44:15 +02:00
committed by GitHub
parent 7da2156237
commit 573e78feeb
7 changed files with 70 additions and 34 deletions

View File

@@ -80,7 +80,9 @@ func ReadPlugin(pluginDir, pluginName string) (m.InstalledPlugin, error) {
}
res := m.InstalledPlugin{}
json.Unmarshal(data, &res)
if err := json.Unmarshal(data, &res); err != nil {
return res, err
}
if res.Info.Version == "" {
res.Info.Version = "0.0.0"