Change remove subcommand behaviour to show error when breaking installed package dependencies

This commit is contained in:
2025-10-09 12:35:58 +03:00
parent ac1ba2ada3
commit c5f48becf8
4 changed files with 57 additions and 19 deletions
+8
View File
@@ -40,3 +40,11 @@ type PackageScriptErr struct {
func (e PackageScriptErr) Error() string {
return fmt.Sprintf("could not execute package script (%s) for package (%s): %s", e.packageScript, e.packageName, e.err)
}
type PackageRemovalDependencyErr struct {
RequiredPackages map[string][]string
}
func (e PackageRemovalDependencyErr) Error() string {
return "removing these package would break other installed packages"
}