Closed jpluimers closed 5 years ago
I have been trying for a while now, but unfortunately I am unable to reproduce the issue that you are seeing.
As such I am afraid I really don't know what can be done to fix your issue unfortunately.
One thing I need you to check for me (I don't think that is the problem, but better safe than sorry).
If you navigate to %ChocolateyInstall%\lib-bad\git.install\tools
, do you see multiple x64 installers there? I am thinking that perhaps there is a left-over executable from when you installed version 2.22.0
which may explain the issue.
Thanks @AdmiringWorm, nail on the head, though it did not resolve the problem, as cleaning, then upgrading gets back the files.
Below is what I did.
Is it possible to get a more verbose log of the git upgrade process?
C:\bin\bin>dir %ChocolateyInstall%\lib-bad\git.install\tools
Volume in drive C is WIN7_DELPHI_SQL
Volume Serial Number is D0E5-A8EE
Directory of C:\ProgramData\chocolatey\lib-bad\git.install\tools
10/04/2019 05:22 PM <DIR> .
10/04/2019 05:22 PM <DIR> ..
10/04/2019 05:22 PM 1,171 chocolateyInstall.ps1
06/09/2019 11:41 AM 46,908,040 Git-2.22.0-32-bit.exe
06/09/2019 11:41 AM 47,087,448 Git-2.22.0-64-bit.exe
10/04/2019 05:22 PM 47,455,080 Git-2.23.0-32-bit.exe
10/04/2019 05:22 PM 47,701,816 Git-2.23.0-64-bit.exe
10/04/2019 05:22 PM 2,871 helpers.ps1
6 File(s) 189,156,426 bytes
2 Dir(s) 2,683,338,752 bytes free
Choco-cleaner cleaned this:
C:\bin\bin>call C:\ProgramData\chocolatey\lib\choco-cleaner\tools\choco-cleaner-manual.bat
Choco-Cleaner.ps1 v0.0.5.2 (01/09/2019) - deletes unnecessary residual Chocolatey files to free up disk space
Copyleft 2017-2019 Bill Curran (bcurran3@yahoo.com) - free for personal and commercial use
Choco-Cleaner Summary:
** Deleting unnecessary Chocolatey _processed.txt (WTF?) file...
** Deleting unnecessary Chocolatey .ignore files...
** Deleting unnecessary Chocolatey .old files...
** Deleting unnecessary Chocolatey cache files...
** Deleting unnecessary Chocolatey config backup files...
** Deleting unnecessary Chocolatey lib-bad package files...
** Deleting unnecessary Chocolatey lib-bkp package files...
** Deleting unnecessary Chocolatey extracted file logs...
** Deleting unnecessary Chocolatey log files...
** Deleting unnecessary Chocolatey package embedded archive files in toolsDir...
** Deleting unnecessary Chocolatey package embedded archives and executables in .nupkg files...
** Deleting unnecessary Chocolatey package embedded license files...
** Deleting unnecessary Chocolatey package embedded Microsoft installers...
** Deleting unnecessary Chocolatey package embedded various read me files...
** Deleting unnecessary Nuget cache files...
Choco-Cleaner finished deleting unnecessary Chocolatey files and saved you 604,192 KB!
Found Choco-Cleaner.ps1 useful?
Buy me a beer at https://www.paypal.me/bcurran3donations
Become a patron at https://www.patreon.com/bcurran3
C:\bin\bin>dir %ChocolateyInstall%\lib-bad\git.install\tools
The system cannot find the path specified.
But then upgrading downloaded all the installers again:
C:\bin\bin>choco upgrade all --yes
Chocolatey v0.10.15
2 validations performed. 1 success(es), 1 warning(s), and 0 error(s).
Validation Warnings:
- A pending system reboot request has been detected, however, this is
being ignored due to the current Chocolatey configuration. If you
want to halt when this occurs, then either set the global feature
using:
choco feature enable -name=exitOnRebootDetected
or pass the option --exit-when-reboot-detected.
Upgrading the following packages:
all
By upgrading you accept licenses for the packages.
7zip v19.0 is the latest version available based on your source(s).
7zip.install v19.0 is the latest version available based on your source(s).
beyondcompare v4.2.10.23938 is the latest version available based on your source(s).
choco-cleaner v0.0.5.2 is the latest version available based on your source(s).
chocolatey v0.10.15 is the latest version available based on your source(s).
chocolatey-core.extension v1.3.3 is the latest version available based on your source(s).
chocolatey-dotnetfx.extension v1.0.1 is newer than the most recent.
You must be smarter than the average bear...
curl v7.66.0.20190926 is the latest version available based on your source(s).
dotnet4.7.1 v4.7.2558.20190226 is the latest version available based on your sou
rce(s).
dotnetfx v4.8.0.20190930 is the latest version available based on your source(s).
Everything v1.4.1935.20190602 is the latest version available based on your source(s).
You have git.install v2.22.0 installed. Version 2.23.0 is available based on your source(s).
Progress: Downloading git.install 2.23.0... 100%
git.install v2.23.0 [Approved]
git.install package files upgrade completed. Performing other installation steps
.
Using Git LFS
ERROR: Cannot process argument transformation on parameter 'file64'. Cannot convert value to type System.String.
The upgrade of git.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\git.install\tools\chocolateyInstall.ps1'.
See log for details.
hg v5.1.2 is the latest version available based on your source(s).
KB2919355 v1.0.20160915 is the latest version available based on your source(s).
KB2919442 v1.0.20160915 is the latest version available based on your source(s).
nircmd v2.86 is the latest version available based on your source(s).
notepadplusplus v7.7.1 is the latest version available based on your source(s).
notepadplusplus.install v7.7.1 is the latest version available based on your source(s).
sed v4.7 is the latest version available based on your source(s).
sourcetree v3.2.6 is the latest version available based on your source(s).
sysinternals v2019.9.23 is the latest version available based on your source(s).
vmware-tools v11.0.0.14549434 is the latest version available based on your source(s).
Chocolatey upgraded 0/22 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- git.install (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\git.install\tools\chocolateyInstall.ps1'.
See log for details.
C:\bin\bin>dir %ChocolateyInstall%\lib-bad\git.install\tools
Volume in drive C is WIN7_DELPHI_SQL
Volume Serial Number is D0E5-A8EE
Directory of C:\ProgramData\chocolatey\lib-bad\git.install\tools
10/04/2019 05:28 PM <DIR> .
10/04/2019 05:28 PM <DIR> ..
10/04/2019 05:28 PM 1,171 chocolateyInstall.ps1
06/09/2019 11:41 AM 46,908,040 Git-2.22.0-32-bit.exe
06/09/2019 11:41 AM 47,087,448 Git-2.22.0-64-bit.exe
10/04/2019 05:28 PM 47,455,080 Git-2.23.0-32-bit.exe
10/04/2019 05:28 PM 47,701,816 Git-2.23.0-64-bit.exe
10/04/2019 05:28 PM 2,871 helpers.ps1
6 File(s) 189,156,426 bytes
2 Dir(s) 2,530,492,416 bytes free
OK, this is my mistake as I am the author of such git.install code. This wouldn't happen if git installer weren't using globs but complete file name as @AdmiringWorm insisted multiple times. This is not normal situation, it shouldn't happen that old installers are left out but it happens relativelly frequentlly so we need to have a new solution here.
Another solution, besides what @AdmiringWorm uses, maybe even better one, would be to just delete older files except the latest one:
# There might be older files
ls $toolsPath\*.exe | sort LastWriteTime -Descending | select -skip 1 | rm
$packageArgs = @{
PackageName = 'git.install'
FileType = 'exe'
SoftwareName = 'Git version *'
File = Get-Item $toolsPath\*-32-bit.exe
File64 = Get-Item $toolsPath\*-64-bit.exe
SilentArgs = "/VERYSILENT", "/SUPPRESSMSGBOXES", "/NORESTART", "/NOCANCEL", "/SP-", "/LOG", (Get-InstallComponents $pp)
}
Install-ChocolateyInstallPackage @packageArgs
Get-ChildItem $toolsPath\*.exe | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" '' } }
This one is IMO better as
rm toolsPath\*.exe -Exclude $flle, $file64
Or we could use full file name.
OK, this wont happen any more with this package (after next official update).
Chocolatey v0.10.15 on Windows 7 Professional; version 6.1.7601.65536 upgrading to git.install 2.23.0: "ERROR: Cannot process argument transformation on parameter 'file64'. Cannot convert value to type System.String."
Related issue https://github.com/chocolatey-community/chocolatey-coreteampackages/issues/574 was resolved with the current chocolatey version I am using.
Expected Behavior
Install without error.
Current Behavior
Install with this error:
Additional log information at the bottom of this issue. Full log at https://gist.github.com/jpluimers/4ef698d8571276fc46bbe3949f85817a
Possible Solution
N/A
Steps to Reproduce (for bugs)
On this particular system (no other Windows 7 systems left to test on):
choco upgrade all --yes
Context
Trying to upgrade all packages using
"C:\ProgramData\chocolatey\choco.exe" upgrade all --yes
Your Environment
Additional verbose log information
Excerpts from
C:\ProgramData\chocolatey\logs\chocolatey.log
: