Skip to content

Commit 6565c53

Browse files
committed
add newlines
1 parent 0810c5e commit 6565c53

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

lib/autoupdate/agent/updater.go

+14-7
Original file line numberDiff line numberDiff line change
@@ -455,29 +455,34 @@ func (u *Updater) Remove(ctx context.Context, force bool) error {
455455
if filepath.Clean(cfg.Spec.Path) != filepath.Clean(defaultPathDir) {
456456
if u.TeleportServiceName == serviceName {
457457
if !force {
458-
u.Log.ErrorContext(ctx, "Default Teleport systemd service would be removed, and --force was not passed. Refusing to remove Teleport from this system.")
458+
u.Log.ErrorContext(ctx, "Default Teleport systemd service would be removed, and --force was not passed.")
459+
u.Log.ErrorContext(ctx, "Refusing to remove Teleport from this system.")
459460
return trace.Errorf("unable to remove Teleport completely without --force")
460461
} else {
461-
u.Log.WarnContext(ctx, "Default Teleport systemd service will be removed since --force was passed. Teleport will be removed from this system.")
462+
u.Log.WarnContext(ctx, "Default Teleport systemd service will be removed since --force was passed.")
463+
u.Log.WarnContext(ctx, "Teleport will be removed from this system.")
462464
}
463465
}
464466
return u.removeWithoutSystem(ctx, cfg)
465467
}
466468
revert, err := u.Installer.LinkSystem(ctx)
467469
if errors.Is(err, ErrNoBinaries) {
468470
if !force {
469-
u.Log.ErrorContext(ctx, "No packaged installation of Teleport was found, and --force was not passed. Refusing to remove Teleport from this system.")
471+
u.Log.ErrorContext(ctx, "No packaged installation of Teleport was found, and --force was not passed.")
472+
u.Log.ErrorContext(ctx, "Refusing to remove Teleport from this system.")
470473
return trace.Errorf("unable to remove Teleport completely without --force")
471474
} else {
472-
u.Log.WarnContext(ctx, "No packaged installation of Teleport was found, and --force was passed. Teleport will be removed from this system.")
475+
u.Log.WarnContext(ctx, "No packaged installation of Teleport was found, and --force was passed.")
476+
u.Log.WarnContext(ctx, "Teleport will be removed from this system.")
473477
}
474478
return u.removeWithoutSystem(ctx, cfg)
475479
}
476480
if err != nil {
477481
return trace.Wrap(err, "failed to link")
478482
}
479483

480-
u.Log.InfoContext(ctx, "Updater-managed installation of Teleport detected. Restoring packaged version of Teleport before removing.")
484+
u.Log.InfoContext(ctx, "Updater-managed installation of Teleport detected.")
485+
u.Log.InfoContext(ctx, "Restoring packaged version of Teleport before removing.")
481486

482487
revertConfig := func(ctx context.Context) bool {
483488
if ok := revert(ctx); !ok {
@@ -523,7 +528,8 @@ func (u *Updater) Remove(ctx context.Context, force bool) error {
523528
u.Log.ErrorContext(ctx, "Reverting symlinks due to failed restart.")
524529
if ok := revertConfig(ctx); ok {
525530
if err := u.Process.Reload(ctx); err != nil && !errors.Is(err, ErrNotNeeded) {
526-
u.Log.ErrorContext(ctx, "Failed to reload Teleport after reverting. Installation likely broken.", errorKey, err)
531+
u.Log.ErrorContext(ctx, "Failed to reload Teleport after reverting.", errorKey, err)
532+
u.Log.ErrorContext(ctx, "Installation likely broken.")
527533
} else {
528534
u.Log.WarnContext(ctx, "Teleport updater detected an error with the new installation and successfully reverted it.")
529535
}
@@ -539,7 +545,8 @@ func (u *Updater) Remove(ctx context.Context, force bool) error {
539545
}
540546

541547
func (u *Updater) removeWithoutSystem(ctx context.Context, cfg *UpdateConfig) error {
542-
u.Log.InfoContext(ctx, "Updater-managed installation of Teleport detected. Attempting to unlink and remove.")
548+
u.Log.InfoContext(ctx, "Updater-managed installation of Teleport detected.")
549+
u.Log.InfoContext(ctx, "Attempting to unlink and remove.")
543550
ok, err := isActiveOrEnabled(ctx, u.Process)
544551
if err != nil && !errors.Is(err, ErrNotSupported) {
545552
return trace.Wrap(err)

0 commit comments

Comments
 (0)