Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent uncompressing of ZIP files as resources #420

Open
Rokory opened this issue Apr 4, 2023 · 0 comments
Open

Inconsistent uncompressing of ZIP files as resources #420

Rokory opened this issue Apr 4, 2023 · 0 comments

Comments

@Rokory
Copy link
Contributor

Rokory commented Apr 4, 2023

I have a resource like this:

@{
    ID = 'Solutions'
    Uri = 'https://somedownloadlink'
    Filename = 'Solutions.zip'
    Expand = $true
    DestinationPath = '\LabResources'
}

The ZIP file contains a single folder called 'Solutions' with approx. 40 files.

When I run the configuration on Windows 11, the VMs receiving that resource end up with a folder c:\LabResources\Solutions containing the files from the ZIP file.

When I run that same configuration on Windows Server 2022, the VMs receiving the resource end up with a folder c:\LabResources containing the files from the ZIP file. The folder Solutions is omitted.

When I change the Destination Path to \LabResource\Solutions, on Windows 11, I get c:\LabResources\Solutions\Solutions, on Windows Server 2022, I get c:\LabResources\Solutions.

I cannot figure out, why this is not running consistently. Moreover, I question, why the script uses complicated calls to the .NET Framework instead of simply using Expand-Archive, which works consistently on both platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant