ScoopInstaller / Scoop

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

[Bug] Default proxy not recognized by "bucket add" #5997

Open stratozero opened 4 months ago

stratozero commented 4 months ago

Bug Report

Current Behavior

After setting the current proxy with scoop config proxy currentuser@default, the installation of new packages succeeds, but adding new packages results in an error: "fatal: unable to access 'XYZ.git': Could not resolve proxy: default"

Expected Behavior

The two commands should interpret the proxy settings in a consistent way

Additional context/output

In my case the specific bucket I was trying to add was that of jreleaser:

image

Possible Solution

There are a number of possible solutions: the first that comes me to mind is to add git configuration commands in the "setup_proxy" function, but to maintain less code, can I suggest to avoid handling proxies and always use the defaults from windows configurations?

System details

Windows version: 10 OS architecture: 64bit PowerShell version: 7.4.2

Additional software: git version 2.45.0.windows.1

Scoop Configuration

{
  "last_update": "2024-06-03T11:23:10.6397593+02:00",
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop",
  "scoop_branch": "master",
  "proxy": "currentuser@default",
  "gh_token": "ghp_****obfuscated***"
}
HUMORCE commented 2 months ago

https://github.com/ScoopInstaller/Scoop/blob/be56faf29016a3bb82f5bc15d3e4621930ea7a38/lib/core.ps1#L282-L299

currentuser@default and NULL has not been handled in Invoke-Git function.