Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit fd777b9

Browse files
author
Alexander Paliarush
committed
Improved robustness of EE linking on Windows
1 parent 38a4db7 commit fd777b9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

m-switch-to-ce

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ if [[ ${host_os} == "Windows" || $(bash "${vagrant_dir}/scripts/get_config_value
3030
if [ -f ${magento_ce_dir}/app/etc/aliases_to_classes_map.json ]; then
3131
rm ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
3232
fi
33-
if [ -f ${magento_ce_dir}/app/etc/enterprise/di.xml ]; then
33+
if [ -f ${magento_ce_dir}/app/etc/enterprise/di.xml ] && [ ! -L ${magento_ce_dir}/app/etc/enterprise ]; then
3434
rm ${magento_ce_dir}/app/etc/enterprise/di.xml
35+
rmdir ${magento_ce_dir}/app/etc/enterprise
3536
fi
3637
fi
3738

m-switch-to-ee

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ cp ${magento_ee_dir}/composer.lock ${magento_ce_dir}/composer.lock
2626

2727
if [[ ${host_os} == "Windows" || $(bash "${vagrant_dir}/scripts/get_config_value.sh" "guest_use_nfs") == 0 ]]; then
2828
# Prevent issues on Windows with incorrect symlinks to files
29-
if [ -f ${magento_ee_dir}/app/etc/aliases_to_classes_map.json ]; then
29+
if [ -f ${magento_ee_dir}/app/etc/aliases_to_classes_map.json ] && [ -L ${magento_ce_dir}/app/etc/aliases_to_classes_map.json ]; then
3030
rm ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
3131
cp ${magento_ee_dir}/app/etc/aliases_to_classes_map.json ${magento_ce_dir}/app/etc/aliases_to_classes_map.json
3232
fi
33-
if [ -f ${magento_ee_dir}/app/etc/enterprise/di.xml ]; then
34-
rm ${magento_ce_dir}/app/etc/enterprise/di.xml
33+
if [ -f ${magento_ee_dir}/app/etc/enterprise/di.xml ] && [ -L ${magento_ce_dir}/app/etc/enterprise ]; then
34+
rm ${magento_ce_dir}/app/etc/enterprise
35+
mkdir ${magento_ce_dir}/app/etc/enterprise
3536
cp ${magento_ee_dir}/app/etc/enterprise/di.xml ${magento_ce_dir}/app/etc/enterprise/di.xml
3637
fi
3738
fi

0 commit comments

Comments
 (0)