From 9ea5ccc4dc4d2c30d838fc99958c0ede54dd8e93 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 21 May 2013 23:04:20 -0400 Subject: [PATCH] bug fix. --- apps/bootstrap/composer.json | 20 +++++++++++++++++++- extensions/composer/yii/composer/InstallHandler.php | 4 ++-- 2 files changed, 21 insertions(+), 3 deletions(-) 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; } }