From f49b7ac20102cde9dd03d5f6bc70ecde98b2cba4 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Fri, 24 Apr 2020 20:34:42 +0200 Subject: [PATCH] fixed the permissions issue for the vm generation. --- vagrant/Vagrantfile | 2 +- vagrant/bootstrap.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index 1713ea2..bba961f 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -43,7 +43,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. config.vm.synced_folder "..", "/home/vagrant/monarc", - owner: "vagrant", group: "vagrant", disabled: false + owner: "vagrant", group: "vagrant", disabled: false, mount_options: ["dmode=777", "fmode=775"] # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index dcdcad8..5f817b6 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -124,21 +124,25 @@ composer install -o # Make modules symlinks. mkdir -p module/Monarc cd module/Monarc -ln -s ./../../vendor/monarc/core Core -ln -s ./../../vendor/monarc/frontoffice FrontOffice +ln -sfn ./../../vendor/monarc/core Core +ln -sfn ./../../vendor/monarc/frontoffice FrontOffice cd $PATH_TO_MONARC # Front-end -mkdir node_modules +mkdir -p node_modules cd node_modules -git clone --config core.fileMode=false https://github.com/monarc-project/ng-client.git ng_client > /dev/null 2>&1 +if [ ! -d "ng_client" ]; then + git clone --config core.fileMode=false https://github.com/monarc-project/ng-client.git ng_client > /dev/null 2>&1 +fi if [ $? -ne 0 ]; then echo "\nERROR: unable to clone the ng-client repository\n" exit 1; fi -git clone --config core.fileMode=false https://github.com/monarc-project/ng-anr.git ng_anr > /dev/null 2>&1 +if [ ! -d "ng_anr" ]; then + git clone --config core.fileMode=false https://github.com/monarc-project/ng-anr.git ng_anr > /dev/null 2>&1 +fi if [ $? -ne 0 ]; then echo "\nERROR: unable to clone the ng-anr repository\n" exit 1;