docker: make reset-urbit-code work properly

This commit is contained in:
Pax Dickinson 2021-04-18 16:00:15 -04:00
parent a77eeed64a
commit cc3fdf80d5

View File

@ -78,11 +78,16 @@ let
resetUrbitCode = writeScriptBin "reset-urbit-code" ''
#!${bashInteractive}/bin/bash
curl -s -X POST -H "Content-Type: application/json" \
-d '{ "source": { "dojo": "|code %reset" }, "sink": { "stdout": null } }' \
http://127.0.0.1:12321
curl=$(curl -s -X POST -H "Content-Type: application/json" \
-d '{ "source": { "dojo": "+hood/code %reset" }, "sink": { "app": "hood" } }' \
http://127.0.0.1:12321)
echo "OK"
if [[ $? -eq 0 ]]
then
echo "OK"
else
echo "Curl error: $?"
fi
'';
in dockerTools.buildImage {