Skip to content

Commit

Permalink
update of satis binary due to changes introduced in alpha3 version of…
Browse files Browse the repository at this point in the history
… satis
  • Loading branch information
realshadow committed Apr 18, 2017
1 parent 594c22e commit e8654e2
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions bin/satis
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
#!/usr/bin/env php

<?php

require __DIR__.'/../bootstrap/autoload.php';
require_once __DIR__.'/../bootstrap/app.php';
require __DIR__ . '/../vendor/composer/satis/src/bootstrap.php';

$appConfig = require __DIR__ . '/../config/satis.php';

use Composer\Satis\Console\Application;

/*
foreach(['http', 'https'] as $protocol) {
$proxy = $appConfig['proxy'][$protocol];
if($proxy !== null) {
putenv(strtoupper($protocol) . '_PROXY=' . $proxy);
putenv(strtolower($protocol) . '_proxy=' . $proxy);
}
}*/

putenv('COMPOSER_HOME=' . $appConfig['composer_home']);
putenv('COMPOSER_CACHE_DIR=' . $appConfig['composer_cache']);

$application = new Application();
function includeIfExists($file)
{
if (file_exists($file)) {
return include $file;
}
}

if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
print('You must set up the project dependencies using Composer before you can use Satis.');
exit(1);
}

$application = new Composer\Satis\Console\Application();
$application->run();

0 comments on commit e8654e2

Please sign in to comment.