diff --git a/scripts/yocto_cache_setup.sh b/scripts/yocto_cache_setup.sh
index 553498f103d4f719376264187fedb51ac085f15a..6a04d28ced277a75f6e3d237b10bf47e134f7a9f 100644
--- a/scripts/yocto_cache_setup.sh
+++ b/scripts/yocto_cache_setup.sh
@@ -24,9 +24,9 @@ if [ -z "$CUSTOM" ]; then
   fi
 else
   if [[ "$CI_JOB_NAME" != *"embedded"* ]]; then
-    echo 'SSTATE_DIR = "/var/cache/edgehog_sstate-${CUSTOM}-things"' >> conf/local.conf;
+    echo 'SSTATE_DIR = "/var/cache/edgehog_sstate-'"${CUSTOM}"'-things"' >> conf/local.conf;
   else 
-    echo 'SSTATE_DIR = "/var/cache/edgehog_sstate-${CUSTOM}-embedded"' >> conf/local.conf;
+    echo 'SSTATE_DIR = "/var/cache/edgehog_sstate-'"${CUSTOM}"'-embedded"' >> conf/local.conf;
   fi
 fi