cmds.projects.CmdGetAuthInfo: Fix: echo credentials "None" #122

Merged
Jan Lindemann merged 1 commit from jan/fix/20260922-cmds-projects-cmdgetauthinfo-fix-echo-credentials-none into master 2026-09-22 16:33:21 +02:00 AGit

2026-09-22

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
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>
2026-09-22 16:21:03 +02:00