rancher / tasks

1 stars 1 forks source link

Fix Expand-7Zip missing error but layer is marked as valid for Windows #118

Closed superseb closed 3 years ago

superseb commented 4 years ago

This layer is cached:

---> Using cache
--
78 | ---> c5eab33544a6
79 | Step 7/23 : RUN if (-not (Get-Command Expand-7Zip -ErrorAction Ignore)) {        Install-PackageProvider -Name NuGet -Force -Verbose;        Install-Module -Name 7Zip4Powershell -Repository PSGallery -Force -Verbose;        if(-not $?) {             Write-Error "Failed to install package";             Exit 1;        }     }

And this command fails because Expand-7Zip is not actually present:


---> Running in fe527e1a9379
--
84 | Downloading Kubernetes from https://dl.k8s.io/v1.14.3/kubernetes-client-windows-amd64.tar.gz ...
85 | Expanding ...
86 | Expand-7Zip : The term 'Expand-7Zip' is not recognized as the name of a
87 | cmdlet, function, script file, or operable program. Check the spelling of the
88 | name, or if a path was included, verify that the path is correct and try again.
89 | At line:1 char:1187

See https://drone-publish.rancher.io/rancher/rancher/4094/5/4