diff --git a/tests/install_sodium.sh b/tests/install_sodium.sh
index 907bff8cf56f499083a92ceece844e00749cc164..d03196695220740ed539d0a48eb964d3f0c10aec 100755
--- a/tests/install_sodium.sh
+++ b/tests/install_sodium.sh
@@ -1,4 +1,6 @@
 #!/bin/sh
+set -e
+
 cd $HOME
 wget http://download.dnscrypt.org/libsodium/releases/libsodium-0.2.tar.gz
 tar xvf libsodium-0.2.tar.gz