build.cmds.CmdListRepos: Pass -f to curl

curl exits with 0 success status, even if the server returns HTTP
401. Passing -f fixes that and has curl error out with exit code 22.
It doesn't show which error, though.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-20 10:56:47 +01:00
commit 50744fc41e

View file

@ -41,6 +41,7 @@ class CmdListRepos(Cmd): # export
case 'https':
if re.match(r'https://github.com', args.base_url):
curl_args = [
'-f',
'-H',
'Accept: application/vnd.github+json',
'-H',
@ -53,7 +54,7 @@ class CmdListRepos(Cmd): # export
return
if re.match(r'https://', args.base_url):
# assume Forgejo Backend
curl_args = []
curl_args = ['-f']
if re.match(r'https://janware.test', args.base_url):
curl_args.append('--insecure')
curl_args.extend([