Skip to content

ci: give better feedback when we fail to wget download-git-cache.sh

Marc Herbert requested to merge marc-hb/mesa:ci-html-signin into main

If you think a failure to access a "raw" file would return some 404 error and cause wget to have a non-zero exit code then you'd be wrong. Instead, bash tries to run HTML code like this:

https://gitlab.freedesktop.org/marc-hb/mesa/-/jobs/66016188

+ bash download-git-cache.sh
download-git-cache.sh: line 1: syntax error near unexpected token `newline'
download-git-cache.sh: line 1: `<!DOCTYPE html>'

Try to be less cryptic and show the start of the HTML error file, it's like to have something useful like this:

download-git-cache.sh: text/html
<!DOCTYPE html>
<html class="html-devise-layout gl-light" lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>Sign in · GitLab</title>
<script>
//<![CDATA[
window.gon={};

Merge request reports

Loading