Skip to content

Commit

Permalink
update install cli module
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Apr 28, 2017
1 parent e4e8137 commit 65973d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/core/Directus/Console/Modules/InstallModule.php
Expand Up @@ -104,7 +104,7 @@ public function cmdConfig($args, $extra)
$data['db_password'] = 'directus';
$data['directus_path'] = '/';

$directusPath = BASE_PATH . '/';
$directusPath = BASE_PATH;

foreach ($args as $key => $value) {
switch ($key) {
Expand All @@ -127,15 +127,15 @@ public function cmdConfig($args, $extra)
$data['db_password'] = $value;
break;
case 'r':
$data['directus_path'] = $value;
$directusPath = $value;
break;
case 'd':
$directusPath = $directusPath . trim($value, '/');
$data['directus_path'] = rtrim($value, '/') . '/';
break;
}
}

$apiPath = $directusPath . '/api';
$apiPath = rtrim($directusPath, '/') . '/api';
if (!file_exists($apiPath)) {
throw new \Exception(sprintf('Path "%s" does not exists', $apiPath));
}
Expand Down

0 comments on commit 65973d9

Please sign in to comment.