mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
cleanup on uninstall
This commit is contained in:
@@ -63,6 +63,18 @@ impl PackageState {
|
||||
)),
|
||||
}
|
||||
}
|
||||
pub fn expect_removing(&self) -> Result<&InstalledState, Error> {
|
||||
match self {
|
||||
Self::Removing(a) => Ok(a),
|
||||
_ => Err(Error::new(
|
||||
eyre!(
|
||||
"Package {} is not in removing state",
|
||||
self.as_manifest(ManifestPreference::Old).id
|
||||
),
|
||||
ErrorKind::InvalidRequest,
|
||||
)),
|
||||
}
|
||||
}
|
||||
pub fn into_installing_info(self) -> Option<InstallingInfo> {
|
||||
match self {
|
||||
Self::Installing(InstallingState { installing_info })
|
||||
|
||||
Reference in New Issue
Block a user