Skip to content

Commit

Permalink
[common.vm] Fix VM-Uninstall-IDA-Plugin
Browse files Browse the repository at this point in the history
The string `VM-Get-IDA-Plugins-Dir` was being used instead of calling
the function. In `Remove-Item` we need `-Force` to remove read-only and
hidden files, `-Recurse` to remove directories, and `- ea 0` because of
a bug with the `ErrorActionPreference`.
  • Loading branch information
Ana06 committed May 8, 2024
1 parent 3e0f7bb commit f87c62e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/common.vm/common.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>common.vm</id>
<version>0.0.0.20240429</version>
<version>0.0.0.20240508</version>
<description>Common libraries for VM-packages</description>
<authors>Mandiant</authors>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions packages/common.vm/tools/vm.common/vm.common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ function VM-Uninstall-IDA-Plugin {
[Parameter(Mandatory=$true)]
[string] $pluginName # Example: capa_explorer.py
)
$pluginPath = Join-Path VM-Get-IDA-Plugins-Dir $pluginName
Remove-Item $pluginPath
$pluginPath = Join-Path (VM-Get-IDA-Plugins-Dir) $pluginName
Remove-Item $pluginPath -Recuse -Force -ea 0
}

# This functions returns $toolDir and $executablePath
Expand Down

0 comments on commit f87c62e

Please sign in to comment.