@spunto/build 0.28.2 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spunto/build",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "Spunto's shared Build engine — the devcontainer image protocol and VS Code extension registry clients, with no database, no HTTP framework and no UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -278,10 +278,12 @@ while IFS= read -r line; do
|
|
|
278
278
|
esac
|
|
279
279
|
done
|
|
280
280
|
REPO="\${REPO%.git}"
|
|
281
|
-
|
|
281
|
+
# No -f: a refusal's body says why (which account the member authorized, what to do about it).
|
|
282
|
+
RESPONSE=$(curl -sS -m 20 -X POST "$SPUNTO_API_URL/api/workers/git-credential" -H "Authorization: Bearer $SPUNTO_WORKER_TOKEN" -H "Content-Type: application/json" -d "{\\"repo\\":\\"$REPO\\"}" 2>/dev/null)
|
|
282
283
|
PASSWORD=$(printf "%s" "$RESPONSE" | sed -n 's/.*"password":"\\([^"]*\\)".*/\\1/p')
|
|
283
284
|
if [ -z "$PASSWORD" ]; then
|
|
284
|
-
|
|
285
|
+
REASON=$(printf "%s" "$RESPONSE" | sed -n 's/.*"error":"\\([^"]*\\)".*/\\1/p')
|
|
286
|
+
echo "spunto: no git credential for $REPO - \${REASON:-authorize the provider in Integrations.}" >&2
|
|
285
287
|
exit 0
|
|
286
288
|
fi
|
|
287
289
|
USERNAME=$(printf "%s" "$RESPONSE" | sed -n 's/.*"username":"\\([^"]*\\)".*/\\1/p')
|