Error out on wrong bin config
parent
15ab5868a3
commit
6a50dbd46d
|
@ -58,7 +58,10 @@ class ArrayLoader
|
|||
$package->setExtra($config['extra']);
|
||||
}
|
||||
|
||||
if (isset($config['bin']) && is_array($config['bin'])) {
|
||||
if (isset($config['bin'])) {
|
||||
if (!is_array($config['bin'])) {
|
||||
throw new \UnexpectedValueException('Package '.$config['name'].'\'s bin key should be an array, '.gettype($config['bin']).' given.');
|
||||
}
|
||||
foreach ($config['bin'] as $key => $bin) {
|
||||
$config['bin'][$key]= ltrim($bin, '/');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue