diff --git a/apps/bootstrap/composer.json b/apps/bootstrap/composer.json index b2300b2..6bd87cc 100644 --- a/apps/bootstrap/composer.json +++ b/apps/bootstrap/composer.json @@ -15,6 +15,24 @@ "minimum-stability": "dev", "require": { "php": ">=5.3.0", - "yiisoft/yii2": "dev-master" + "yiisoft/yii2": "dev-master", + "yiisoft/yii2-composer": "dev-master" + }, + "scripts": { + "post-install-cmd": [ + "yii\\composer\\InstallHandler::setPermissions" + ], + "post-update-cmd": [ + "yii\\composer\\InstallHandler::setPermissions" + ] + }, + "extra": { + "writable": [ + "runtime", + "www/assets" + ], + "executable": [ + "yii" + ] } } diff --git a/extensions/composer/yii/composer/InstallHandler.php b/extensions/composer/yii/composer/InstallHandler.php index e9d4f51..6d43abd 100644 --- a/extensions/composer/yii/composer/InstallHandler.php +++ b/extensions/composer/yii/composer/InstallHandler.php @@ -41,11 +41,11 @@ class InstallHandler foreach ((array)$options['executable'] as $path) { echo "Setting executable: $path ..."; - if (is_dir($path)) { + if (is_file($path)) { chmod($path, 0755); echo "done\n"; } else { - echo "The file was not found: " . getcwd() . DIRECTORY_SEPARATOR . $path; + echo "\n\tThe file was not found: " . getcwd() . DIRECTORY_SEPARATOR . $path . "\n"; return; } }