Skip to content

Commit

Permalink
Also allow setting of CRAFT_ENVIRONMENT via env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart van Gennep committed Apr 5, 2016
1 parent e29dd90 commit 4f7f9dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/schematic
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $craftPluginsPath = getenv('CRAFT_PLUGINS_PATH') ? getenv('CRAFT_PLUG
$craftStoragePath = getenv('CRAFT_STORAGE_PATH') ? getenv('CRAFT_STORAGE_PATH') : $craftBasePath.'storage/';
$craftTemplatesPath = getenv('CRAFT_TEMPLATES_PATH') ? getenv('CRAFT_TEMPLATES_PATH') : $craftBasePath.'templates/';
$craftTranslationsPath = getenv('CRAFT_TRANSLATIONS_PATH') ? getenv('CRAFT_TRANSLATIONS_PATH') : $craftBasePath.'translations/';
$craftEnvironment = getenv('CRAFT_ENVIRONMENT') ? getenv('CRAFT_ENVIRONMENT') : 'console';

defined('CRAFT_BASE_PATH') || define('CRAFT_BASE_PATH', $craftBasePath);
defined('CRAFT_APP_PATH') || define('CRAFT_APP_PATH', $craftAppPath);
Expand All @@ -31,7 +32,7 @@ defined('CRAFT_PLUGINS_PATH') || define('CRAFT_PLUGINS_PATH', $craftPl
defined('CRAFT_STORAGE_PATH') || define('CRAFT_STORAGE_PATH', $craftStoragePath);
defined('CRAFT_TEMPLATES_PATH') || define('CRAFT_TEMPLATES_PATH', $craftTemplatesPath);
defined('CRAFT_TRANSLATIONS_PATH') || define('CRAFT_TRANSLATIONS_PATH', $craftTranslationsPath);
defined('CRAFT_ENVIRONMENT') || define('CRAFT_ENVIRONMENT', 'console');
defined('CRAFT_ENVIRONMENT') || define('CRAFT_ENVIRONMENT', $craftEnvironment);

/*
* Yii command line script file configured for Craft.
Expand Down

0 comments on commit 4f7f9dd

Please sign in to comment.