ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.95k stars 1.39k forks source link

[Bug] cannot install older version of gitextensions #5573

Closed mfechner closed 1 year ago

mfechner commented 1 year ago

Bug Report

Current Behavior

Gitextension version 4 require dotnet 6 which must be installed as admin and does not exist on the system. So I try to install gitextension version 3.5.4, see also here: https://github.com/gitextensions/gitextensions/releases/tag/v3.5.4

I tried many combinations:

scoop install gitextensions@3.5.4.12724-65f01f399
scoop install gitextensions@3.5.4.12724
scoop install gitextensions@3.5.4
scoop install gitextensions@3

Expected Behavior

It should be possible to install an older version of gitextensions as not every computer has dotnet 6 installed.

Additional context/output

The error message is:

WARN  Given version (3.5.4.12724-65f01f399) does not match manifest (4.1.0.16698)
WARN  Attempting to generate manifest for 'gitextensions' (3.5.4.12724-65f01f399)
Autoupdating gitextensions
Downloading GitExtensions-Portable-3.5.4.12724-65f01f399-$matchCommit.zip to compute hashes!
The remote server returned an error: (404) Not Found.
URL https://github.com/gitextensions/gitextensions/releases/download/v$matchTag/GitExtensions-Portable-3.5.4.12724-65f01f399-$matchCommit.zip is not valid
Could not install gitextensions@3.5.4.12724-65f01f399
Select-CurrentVersion : Cannot bind argument to parameter 'AppName' because it is an empty string.
At C:\Development\Scoop\apps\scoop\current\lib\core.ps1:239 char:54
+     return $null -ne (Select-CurrentVersion -AppName $app -Global:$gl ...
+                                                      ~~~~
    + CategoryInfo          : InvalidData: (:) [Select-CurrentVersion], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Select-CurrentVersion

You cannot call a method on a null-valued expression.
At C:\Development\Scoop\apps\scoop\current\lib\manifest.ps1:36 char:5
+     $app = $app.TrimStart('/')
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Couldn't find manifest for ''.

Possible Solution

System details

Windows version: 10 (21H2)

OS architecture: 64-bit

PowerShell version: [output of "$($PSVersionTable.PSVersion)"] 5.1.19041.3031 Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

5.1.19041.3031
HUMORCE commented 1 year ago

This feature is not available on all manifests. When autoupdate url contains variables other than pre-defined variables, it fails.

You can find target version of the manifest at it's commits, then install it via url.

For this case:

commit: https://github.com/ScoopInstaller/Extras/commit/a5e1bd4c8156cd712d8cd3ee1e797491588cbeb6 raw: https://github.com/ScoopInstaller/Extras/raw/a5e1bd4c8156cd712d8cd3ee1e797491588cbeb6/bucket/gitextensions.json

❯ scoop download https://github.com/ScoopInstaller/Extras/raw/a5e1bd4c8156cd712d8cd3ee1e797491588cbeb6/bucket/gitextensions.json
INFO  Downloading 'gitextensions' [64bit]
GitExtensions-Portable-3.5.4.12724-65f01f399.zip (22.1 MB) [==========================================================] 100%
Checking hash of GitExtensions-Portable-3.5.4.12724-65f01f399.zip ... ok.
'gitextensions' (3.5.4.12724) was downloaded successfully!

See also: https://github.com/ScoopInstaller/Scoop/issues/3894

rashil2000 commented 1 year ago

See also https://github.com/ScoopInstaller/Scoop/issues/3045#issuecomment-460069502