( cmd *cobra.Command, manager updateManager, applied aghupdate.AppliedBinary, release *aghupdate.Release, record updateRecord, )
| 143 | } |
| 144 | |
| 145 | func finishLocalUpdate( |
| 146 | cmd *cobra.Command, |
| 147 | manager updateManager, |
| 148 | applied aghupdate.AppliedBinary, |
| 149 | release *aghupdate.Release, |
| 150 | record updateRecord, |
| 151 | ) error { |
| 152 | if err := manager.Finalize(applied); err != nil { |
| 153 | record.Status = string(aghupdate.StatusFailed) |
| 154 | record.Message = err.Error() |
| 155 | return writeUpdateFailure(cmd, record, err) |
| 156 | } |
| 157 | record.Status = string(aghupdate.StatusUpdated) |
| 158 | record.CurrentVersion = strings.TrimSpace(release.Version) |
| 159 | record.Message = "Updated AGH to " + strings.TrimSpace(release.Version) + "." |
| 160 | return writeCommandOutput(cmd, updateBundle(record)) |
| 161 | } |
| 162 | |
| 163 | func restartDaemonAfterUpdate( |
| 164 | cmd *cobra.Command, |
no test coverage detected