Skip to content

Commit 2486e4c

Browse files
committed
removes unsafe user stop requests
1 parent d82e24b commit 2486e4c

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

core/system.go

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@ func (s *ABSystem) RunOperation(operation ABSystemOperation, deleteBeforeCopy bo
361361
return err
362362
}
363363

364+
err = s.createFinalizingFile()
365+
if err != nil {
366+
PrintVerboseErr("ABSystem.RunOperation", 5.3, err)
367+
return err
368+
}
369+
364370
if deleteBeforeCopy || os.Getenv("ABROOT_DELETE_BEFORE_COPY") != "" {
365371
PrintVerboseInfo("ABSystemRunOperation", "Deleting future system, this will render the future root temporarily unavailable")
366372
if !dryRun {
@@ -408,12 +414,6 @@ func (s *ABSystem) RunOperation(operation ABSystemOperation, deleteBeforeCopy bo
408414
// ------------------------------------------------
409415
PrintVerboseSimple("[Stage 5] -------- ABSystemRunOperation")
410416

411-
if UserStopRequested() {
412-
err = ErrUserStopped
413-
PrintVerboseErr("ABSystem.RunOperation", 2, err)
414-
return err
415-
}
416-
417417
abimage, err := NewABImage(imageDigest, settings.GetFullImageNameWithTag())
418418
if err != nil {
419419
PrintVerboseErr("ABSystem.RunOperation", 5.1, err)
@@ -456,18 +456,6 @@ func (s *ABSystem) RunOperation(operation ABSystemOperation, deleteBeforeCopy bo
456456
}
457457
}
458458

459-
if UserStopRequested() {
460-
err = ErrUserStopped
461-
PrintVerboseErr("ABSystem.RunOperation", 2, err)
462-
return err
463-
}
464-
465-
err = s.createFinalizingFile()
466-
if err != nil {
467-
PrintVerboseErr("ABSystem.RunOperation", 5.3, err)
468-
return err
469-
}
470-
471459
// Stage 6: Update the bootloader
472460
// ------------------------------------------------
473461
PrintVerboseSimple("[Stage 6] -------- ABSystemRunOperation")

0 commit comments

Comments
 (0)