You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varexMessage=String.Format("Error checking if resource is a dependency: {0}. If you would still like to uninstall, rerun the command with -Force",e.Message);
varexMessage=String.Format("Cannot uninstall '{0}', the following package(s) take a dependency on this package: {1}. If you would still like to uninstall, rerun the command with -Force",pkgName,strUniquePkgNames);
$"Cannot uninstall '{pkgName}'. The following package(s) take a dependency on this package: {strUniquePkgNames}. If you would still like to uninstall, rerun the command with -SkipDependencyCheck"),
@@ -183,16 +182,16 @@ Describe 'Test Uninstall-PSResource for Modules' {
183
182
$pkg=Get-Module"RequiredModule1"-ListAvailable
184
183
$pkg| Should -Not-Be $null
185
184
186
-
$ev| Should -Be "Cannot uninstall 'RequiredModule1', the following package(s) take a dependency on this package: test_module. If you would still like to uninstall, rerun the command with -Force"
185
+
$ev.FullyQualifiedErrorId| Should -BeExactly 'UninstallPSResourcePackageIsaDependency,Microsoft.PowerShell.PowerShellGet.Cmdlets.UninstallPSResource'
187
186
}
188
187
189
-
It "Uninstall module that is a dependency for another module using -Force" {
188
+
It "Uninstall module that is a dependency for another module using -SkipDependencyCheck" {
0 commit comments