Skip to content

Commit

Permalink
Fix VM-Unzip-Recursively
Browse files Browse the repository at this point in the history
Prevent `VM-Unzip-Recursively` to fail setting the error action
preference to `Continue` inside the function (instead of `Error` as set
at the beginning of the file) as we are handling errors inside the
function.
  • Loading branch information
Ana06 committed Dec 16, 2024
1 parent dbb5a96 commit a42d025
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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.20241209</version>
<version>0.0.0.20241216</version>
<description>Common libraries for VM-packages</description>
<authors>Mandiant</authors>
</metadata>
Expand Down
1 change: 1 addition & 0 deletions packages/common.vm/tools/vm.common/vm.common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1828,6 +1828,7 @@ function VM-Create-Ico {
# Delete extracted ZIPS after unzipping them.
# Useful to extract zipped labs downloaded from GDrive keeping the folder structure.
function VM-Unzip-Recursively {
$ErrorActionPreference = 'Continue'
$desktop = Join-Path ${Env:UserProfile} "Desktop"
$zip = Get-Item "$desktop\drive-download*.zip"
if (-Not (Test-Path $zip)) {
Expand Down

0 comments on commit a42d025

Please sign in to comment.