Describe the bug
When msixmgr fails to unpack an MSIX package to a vhdx because the vhdx is not bit enough, it outputs error text but does not return an error so using $? or $LASTEXITCODE in PowerShell cannot determine that an error has occurred
Error text is:
[WARNING] The following packages from C:\temp\Notepad++\NotepadPlusPlus.8.3.3.x64.msix failed to get unpacked. Please try again:
Failed with HRESULT 0x8bad0003 when trying to unpack C:\temp\Notepad++\NotepadPlusPlus.8.3.3.x64.msix
The tool encountered a file write error. If you are unpacking to a VHD, please try again with a larger VHD, as file write errors may be caused by insufficient disk space.
Finished unpacking packages to: C:\temp\notepad.manual.vhdx
Project MSIX SDK
Describe the bug When msixmgr fails to unpack an MSIX package to a vhdx because the vhdx is not bit enough, it outputs error text but does not return an error so using $? or $LASTEXITCODE in PowerShell cannot determine that an error has occurred
Error text is:
[WARNING] The following packages from C:\temp\Notepad++\NotepadPlusPlus.8.3.3.x64.msix failed to get unpacked. Please try again:
Failed with HRESULT 0x8bad0003 when trying to unpack C:\temp\Notepad++\NotepadPlusPlus.8.3.3.x64.msix The tool encountered a file write error. If you are unpacking to a VHD, please try again with a larger VHD, as file write errors may be caused by insufficient disk space.
Finished unpacking packages to: C:\temp\notepad.manual.vhdx
To Reproduce
Expected behavior Return a failed status and set $LASTEXITCODE to 0x8bad0003
Screenshots If applicable, add screenshots to help explain your problem.
Platform
Win10 21H2
Additional context msixmgr v1.1.98.0