Skip to content

Windows - Action fails to extract terraform zip #186

@cpc-camarj

Description

@cpc-camarj

It appears that GitHub action attempts to extract the directory which stores the zip file rather than the zip file itself.

##[debug]Getting build for Terraform version 1.1.9: windows amd64
##[debug]Downloading Terraform CLI from https://releases.hashicorp.com/terraform/1.1.9/terraform_1.1.9_windows_amd64.zip
##[debug]Downloading https://releases.hashicorp.com/terraform/1.1.9/terraform_1.1.9_windows_amd64.zip
##[debug]Destination C:\runner\_work\_temp\6f8260ff-0480-4753-a60e-631c39fe0016
##[debug]download complete
##[debug]Extracting Terraform CLI zip file
##[debug]Using powershell at path: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'C:\runner\_work\_temp\6f8260ff-0480-4753-a60e-631c39fe0016' -DestinationPath 'C:\runner\_work\_temp\42e7c998-6842-4bac-b5d3-517594df6e7c' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\runner\_work\_temp\6f8260ff-0480-4753-a60e-631c39fe0016', 'C:\runner\_work\_temp\42e7c998-6842-4bac-b5d3-517594df6e7c', $true) }"
Expand-Archive :  is not a supported archive file format. .zip is the only supported archive file format.
At line:1 char:210
+ ...  Ignore)) { Expand-Archive -LiteralPath 'C:\runner\ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:String) [Expand-Archive], IOException
    + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive
 
Error: Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1
Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions