Open shoddyguard opened 4 years ago
I've got a better workaround rather than filtering out the $_.Exception.Message.
If you temporarily replace your TEMP path with the full path instead of the truncated path the package installs without fault:
$env:TEMP = (Get-Item $env:TEMP).FullName
When running
Install-Package -Name docker -ProviderName DockerMsftProvider -Force
as part of an unattended installation on Server 2019 Datacenter (April 2020 Update) the script bombs out due to a erroneous missing file.I believe the issue is that something is referencing
$env:TEMP
but this environment variable can be truncated to the DOS 8.3 standard which is causing some issue with whatever check there is for the presence of the file.Stepping through the process it seems to be the
Docker_DockerSearchIndex.json
file:If I check my
$env:TEMP
variable I indeed get:PS C:\Users\user.name>> $env:TEMP C:\Users\S552A~1.B-A\AppData\Local\Temp\2
Checking for the presence of the file manually I can find itI've tried this on 5 different machines (physical and virtual) and the result is the same.
Docker does however appear to install and run just fine, however this error is especially annoying as it can't easily be filtered out via a
try/catch
due to the fact that it's aSystem.Exception
.If other people run into this as a workaround you can filter on
$_.Exception.Message