cmds.projects.CmdGetAuthInfo: Fix: echo credentials "None"
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m23s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 6m49s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m0s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 7m0s
CI / Packaging test (push) Successful in 0s
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m23s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 6m49s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m0s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 7m0s
CI / Packaging test (push) Successful in 0s
get-auth-info() reads the origin URL of the jw-pkg repository and reports its username and password. Uri.username and Uri.password are None for URLs without a credentials part, but _run() stored them in the result anyway, so --username --only-values printed the literal string "None" for such URLs. The bootstrap Makefile derives JANWARE_USER from exactly that output on its second parse, after the jw-pkg directory has been cloned from an anonymous https origin whose URL has no user part. JANWARE_USER thus became the string "None", pgit.sh is invoked with --login None and --refspec None:current-branch:current-branch, and queries the Forgejo API for the repositories of a non-existent "None" org, so every anonymous bootstrap fails with "Failed to enumerate repositories". Make _run() only record values that are not None, so missing credentials produce no output instead of the string "None". Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.87.0 Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c7c9779e40
commit
e7ee87fa91
1 changed files with 3 additions and 1 deletions
|
|
@ -79,7 +79,9 @@ class CmdGetAuthInfo(Cmd): # export
|
|||
]: # TODO: Use other remotes, too?
|
||||
parsed = Uri(url)
|
||||
for key in keys:
|
||||
result[key] = getattr(parsed, key)
|
||||
val = getattr(parsed, key)
|
||||
if val is not None:
|
||||
result[key] = val
|
||||
base = parsed.to_string
|
||||
base = re.sub(r'/jw-pkg', '', base)
|
||||
base = re.sub(r'/proj$', '', base)
|
||||
|
|
|
|||
Loading…
Reference in a new issue