diff --git a/images/ubuntu/scripts/build/configure-system.sh b/images/ubuntu/scripts/build/configure-system.sh index 4c82e353842a..26aa9390ebb0 100644 --- a/images/ubuntu/scripts/build/configure-system.sh +++ b/images/ubuntu/scripts/build/configure-system.sh @@ -24,11 +24,11 @@ replace_etc_environment_variable "PATH" "${ENVPATH}" echo "Updated /etc/environment: $(cat /etc/environment)" # Clean yarn and npm cache -if yarn --version > /dev/null; then +if type yarn > /dev/null; then yarn cache clean fi -if npm --version; then +if type npm > /dev/null; then npm cache clean --force fi