Skip to content

Commit a6033ef

Browse files
committed
limactl factory-reset: check inst.Protected
Signed-off-by: Akihiro Suda <[email protected]>
1 parent d4828d3 commit a6033ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: cmd/limactl/factory-reset.go

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ func factoryResetAction(_ *cobra.Command, args []string) error {
3939
}
4040
return err
4141
}
42+
if inst.Protected {
43+
return errors.New("instance is protected to prohibit accidental factory-reset (Hint: use `limactl unprotect`)")
44+
}
4245

4346
instance.StopForcibly(inst)
4447

0 commit comments

Comments
 (0)