diff --git a/neon/build.sh b/neon/build.sh
index 19c59a84fafd06d3a82cc3293aa8dcc981ef1577..a71a80952b88a5eddfde8e327a81717be7627ff9 100755
--- a/neon/build.sh
+++ b/neon/build.sh
@@ -1,29 +1,23 @@
 #!/bin/sh
 
-cd neon
-
-if [ -z "${DUNITER_FAST_BUILD}" ]
-then
-    if [ -e "${HOME}/.cargo/bin/rustup" ]
-    then
+if [ -z "${DUNITER_FAST_BUILD}" ]; then
+    if [ "$(command -v rustup)" ]; then
         rustup update stable
-    else
+    elif [ ! "$(command -v cargo)" ]; then
         curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
         export PATH="$HOME/.cargo/bin:$PATH"
     fi
-
-    rustup show
-    rustc --version
-    cargo --version
 else
     echo "WARNING: you have disabled the automatic update of Rust, remember to update Rust regularly with command \"rustup update\"."
 fi
 
-if [ "${NEON_BUILD_RELEASE}" = "true" ] || [ "${NODE_ENV}" = "production" ]
-then
-	neon build --release
+rustc --version
+cargo --version
+
+cd neon
+
+if [ "${NEON_BUILD_RELEASE}" = "true" ] || [ "${NODE_ENV}" = "production" ]; then
+    neon build --release
 else
     neon build
 fi
-
-cd ..
\ No newline at end of file