From cc3fdf80d58b4aa32a062e364795df49c0f231d1 Mon Sep 17 00:00:00 2001 From: Pax Dickinson Date: Sun, 18 Apr 2021 16:00:15 -0400 Subject: [PATCH] docker: make reset-urbit-code work properly --- nix/pkgs/docker-image/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/nix/pkgs/docker-image/default.nix b/nix/pkgs/docker-image/default.nix index 6c617de67..6c200a00e 100644 --- a/nix/pkgs/docker-image/default.nix +++ b/nix/pkgs/docker-image/default.nix @@ -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 {