Skip to content

Commit

Permalink
fixed problem with reading file from vendor when run as phar by creat…
Browse files Browse the repository at this point in the history
…ing full paths
  • Loading branch information
hiqsol committed Apr 20, 2017
1 parent c2ee93d commit 5024455
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/base/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ public static function readConfig($path)
*/
public function loadExtraVendor($vendor)
{
/// XXX SHOCK! first time reads wrong file :(
/// XXX Don't know why! need help!
static::readVendorConfig($vendor, 'dotenv');
$this->setExtraEnv(static::readVendorConfig($vendor, 'dotenv'));
static::readVendorConfig($vendor, 'hidev');
$this->setExtraConfig(static::readVendorConfig($vendor, 'hidev'));
}

Expand Down
7 changes: 4 additions & 3 deletions src/controllers/StartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@ protected function requireAll()
if ($file->save($data) || !is_dir('.hidev/vendor')) {
$this->runAction('update');
}
$vendors[] = '.hidev/vendor';
$vendors[] = $this->getRootDir() . '/.hidev/vendor';
} elseif ($this->needsComposerInstall()) {
if ($this->passthru('composer', ['install', '--ansi'])) {
throw new InvalidParamException('Failed initialize project with composer install');
}
}
if (file_exists(ConfigPlugin::path('vendor', 'hidev'))) {
$vendors[] = 'vendor';
$localVendor = $this->getRootDir() . '/vendor';
if (file_exists(ConfigPlugin::path($localVendor, 'hidev'))) {
$vendors[] = $localVendor;
}
if (!empty($vendors)) {
foreach (array_unique($vendors) as $dir) {
Expand Down

0 comments on commit 5024455

Please sign in to comment.