diff --git a/app/check-composer-json.sh b/app/check-composer-json.sh new file mode 100755 index 0000000000..1af75152cf --- /dev/null +++ b/app/check-composer-json.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +if [ -h "composer.json" ]; then + echo 'Please run composer install in the app/ subfolder.' + exit 1 +fi diff --git a/app/composer.json b/app/composer.json index f0b015d037..941a81e78c 100644 --- a/app/composer.json +++ b/app/composer.json @@ -147,10 +147,10 @@ }, "scripts": { "pre-install-cmd": [ - "if [ -h \"composer.json\" ]; then echo 'Please run composer install in the app/ subfolder.'; exit 1; fi" + "./app/check-composer-json.sh" ], "pre-update-cmd": [ - "if [ -h \"composer.json\" ]; then echo 'Please run composer install in the app/ subfolder.'; exit 1; fi" + "./app/check-composer-json.sh" ], "post-install-cmd": [ "App\\Environment::checkEnvironment",