pfn / keepasshttp

KeePass plugin to expose password entries securely (256bit AES/CBC) over HTTP
GNU General Public License v3.0
1.99k stars 275 forks source link

Сhoco install script have mistake dependency? #404

Open badigit opened 2 years ago

badigit commented 2 years ago

I have the latest version of keepass installed with the standard installer. I decided to install the plugin, as described on the main page of the plugin - through choco install keepass-keepasshttp

The problem is that in this case, the installation script for some reason thinks that there is a dependency - Keepass itself (which is already installed) and the chocolately fails to install what is already installed. Why is this happening?

2021-11-05 12:37:32,472 14140 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
2021-11-05 12:37:32,475 14140 [INFO ] - Installing the following packages:
2021-11-05 12:37:32,477 14140 [INFO ] - keepass-keepasshttp
2021-11-05 12:37:32,478 14140 [INFO ] - By installing, you accept licenses for the packages.
2021-11-05 12:37:32,536 14140 [DEBUG] - Using 'https://community.chocolatey.org/api/v2/'.
2021-11-05 12:37:32,839 14140 [DEBUG] - - Supports prereleases? 'True'.
2021-11-05 12:37:32,840 14140 [DEBUG] - - Is ServiceBased? 'True'.
2021-11-05 12:37:33,559 14140 [DEBUG] - Package 'keepass-keepasshttp' found on source 'https://community.chocolatey.org/api/v2/'
2021-11-05 12:37:33,591 14140 [INFO ] - [NuGet] Attempting to resolve dependency 'keepass (? 2.0 && < 3.0)'.
2021-11-05 12:37:36,600 14140 [INFO ] - [NuGet] Attempting to resolve dependency 'keepass.install (? 2.49)'.
2021-11-05 12:37:38,842 14140 [INFO ] - [NuGet] Installing 'keepass.install 2.49'.
2021-11-05 12:37:38,848 14140 [DEBUG] - [NuGet] Added file 'chocolateybeforemodify.ps1' to folder 'keepass.install\tools'.
2021-11-05 12:37:38,854 14140 [DEBUG] - [NuGet] Added file 'chocolateyInstall.ps1' to folder 'keepass.install\tools'.
2021-11-05 12:37:38,861 14140 [DEBUG] - [NuGet] Added file 'KeePass-Setup.exe' to folder 'keepass.install\tools'.
2021-11-05 12:37:38,868 14140 [DEBUG] - [NuGet] Added file 'LICENSE.txt' to folder 'keepass.install\tools'.
2021-11-05 12:37:38,870 14140 [DEBUG] - [NuGet] Added file 'VERIFICATION.txt' to folder 'keepass.install\tools'.
2021-11-05 12:37:38,875 14140 [DEBUG] - [NuGet] Added file 'keepass.install.nupkg' to folder 'keepass.install'.
2021-11-05 12:37:39,110 14140 [DEBUG] - [NuGet] Added file 'keepass.install.nuspec' to folder 'keepass.install'.
2021-11-05 12:37:39,110 14140 [INFO ] - [NuGet] Successfully installed 'keepass.install 2.49'.
2021-11-05 12:37:39,112 14140 [INFO ] - 
keepass.install v2.49 [Approved]
2021-11-05 12:37:39,120 14140 [INFO ] - keepass.install package files install completed. Performing other installation steps.
2021-11-05 12:37:39,184 14140 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\keepass.install\tools\chocolateyInstall.ps1':
2021-11-05 12:37:39,189 14140 [DEBUG] - $ErrorActionPreference = 'Stop';

$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"

$packageArgs = @{
    packageName    = $env:ChocolateyPackageName
    file           = Join-Path -Path $toolsDir -ChildPath 'KeePass-Setup.exe'
    fileType       = 'EXE'
    silentArgs     = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
    validExitCodes = @(0)
}

2021-11-05 12:39:50,905 14140 [INFO ] - Installing keepass.install...
2021-11-05 12:39:50,950 14140 [DEBUG] - Running Start-ChocolateyProcessAsAdmin -validExitCodes '0' -workingDirectory 'C:\ProgramData\chocolatey\lib\keepass.install\tools' -statements '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- ' -exeToRun 'C:\ProgramData\chocolatey\lib\keepass.install\tools\KeePass-Setup.exe' 
2021-11-05 12:39:50,970 14140 [DEBUG] - Test-ProcessAdminRights: returning True
2021-11-05 12:39:50,976 14140 [DEBUG] - Elevating permissions and running ["C:\ProgramData\chocolatey\lib\keepass.install\tools\KeePass-Setup.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- ]. This may take a while, depending on the statements.
2021-11-05 12:39:51,960 14140 [DEBUG] - Command ["C:\ProgramData\chocolatey\lib\keepass.install\tools\KeePass-Setup.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- ] exited with '1'.
2021-11-05 12:39:51,978 14140 [ERROR] - ERROR: Running ["C:\ProgramData\chocolatey\lib\keepass.install\tools\KeePass-Setup.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- ] was not successful. Exit code was '1'. See log for possible error messages.
kendaleiv commented 2 years ago

I tried this and it's working for me. If you're having difficulty with this Chocolatey install you could try installing KeePass a different way and manually load KeePassHttp.plgx at C:\Program Files\KeePass Password Safe 2\Plugins (or, another location if it's installed somewhere else).