echo"Modifications detected in ${#modifiedFiles[@]} files:\n${modifiedFiles[@]}"
fi
fi
if[$needCopyModules -eq 1];then
chmod u+w -R $nodeModulesDir
rm -rf $nodeModulesDir
fi
fi
# Replace node_modules if necessary
if[ ! -d "$nodeModulesDir"];then
if[ -n "${IN_CI_ENVIRONMENT:-''}"];then
# CI jobs might run multiple tasks in parallel, so it is possible that another process is setting up node_modules. In that case, let's wait up to 10 seconds for the .tmp dir goes away
for i in {1..10};do
if[ -d "$nodeModulesDir.tmp"];then
echo"$nodeModulesDir.tmp exists, another process is probably setting up node_modules, waiting for 1 second..."
sleep 1
else
break
fi
done
fi
if[ -d "$nodeModulesDir.tmp"];then
echo"$nodeModulesDir.tmp already exists, another shell session is probably currently setting up node_modules. Please try again in a few moments."
ls -al $STATUS_REACT_HOME
exit1
elif[ ! -d "$nodeModulesDir"];then
echo"Copying node_modules from Nix store (${deps}/node_modules)..."