mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-07 06:22:17 -04:00
cli: remove state on terminate (#2359)
This commit is contained in:
parent
4680882708
commit
36467bf084
2 changed files with 7 additions and 0 deletions
|
@ -88,6 +88,10 @@ func terminate(cmd *cobra.Command, terminator cloudTerminator, fileHandler file.
|
|||
removeErr = errors.Join(err, fmt.Errorf("failed to remove file: '%s', please remove it manually", pf.PrefixPrintablePath(constants.ClusterIDsFilename)))
|
||||
}
|
||||
|
||||
if err := fileHandler.Remove(constants.StateFilename); err != nil && !errors.Is(err, fs.ErrNotExist) {
|
||||
removeErr = errors.Join(err, fmt.Errorf("failed to remove file: '%s', please remove it manually", pf.PrefixPrintablePath(constants.StateFilename)))
|
||||
}
|
||||
|
||||
return removeErr
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue