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 3fc4978d18..2299a066c9 100644 --- a/app/composer.json +++ b/app/composer.json @@ -146,6 +146,12 @@ "guzzlehttp/psr7": "<=1.8.3, >=2.0.0, <=2.1.0" }, "scripts": { + "pre-install-cmd": [ + "./check-composer-json.sh" + ], + "pre-update-cmd": [ + "./check-composer-json.sh" + ], "post-install-cmd": [ "App\\Environment::checkEnvironment", "@auto-scripts" diff --git a/check-composer-json.sh b/check-composer-json.sh new file mode 120000 index 0000000000..e041c594bb --- /dev/null +++ b/check-composer-json.sh @@ -0,0 +1 @@ +app/check-composer-json.sh \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 120000 index 0000000000..44141f74d0 --- /dev/null +++ b/composer.json @@ -0,0 +1 @@ +app/composer.json \ No newline at end of file