feat: a running lazysecrets says when a newer one was installed over it (#90)
Co-authored-by: Karl-Einar Bergstrøm <karl-einarb@outlook.com>
This commit was merged in pull request #90.
This commit is contained in:
1 parent
d0a8b1390d
commit
6a7f53e236
7 files changed
+164
-1
No files matched your search
@@ -18,7 +18,7 @@ import (
|
||||
// default ones.
|
||||
func updater(servers []string) *app.Updater {
|
||||
c := &update.Client{Servers: servers}
|
||||
return &app.Updater{
|
||||
u := &app.Updater{
|
||||
Latest: c.Latest,
|
||||
Install: func(ctx context.Context, r update.Release) error {
|
||||
exe, err := update.Executable()
|
||||
@@ -28,6 +28,10 @@ func updater(servers []string) *app.Updater {
|
||||
return c.Install(ctx, r, exe)
|
||||
},
|
||||
}
|
||||
if b, err := update.Running(); err == nil {
|
||||
u.Replaced = b.Replaced
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
||||
// updateCmd is lazysecrets update [--check]: the newer release's
|
||||
|
||||
Reference in new issue
Block a user