|
@@ 147-154 (lines=8) @@
|
| 144 |
|
* @param Event $event |
| 145 |
|
* @return array an array of directory paths |
| 146 |
|
*/ |
| 147 |
|
public static function getWritableDirs(Event $event) { |
| 148 |
|
$configuration = $event->getComposer()->getPackage()->getExtra(); |
| 149 |
|
if (!isset($configuration['writable-dirs'])) |
| 150 |
|
throw new \Exception('The writable-dirs must be specified in composer arbitrary extra data.'); |
| 151 |
|
if (!is_array($configuration['writable-dirs'])) |
| 152 |
|
throw new \Exception('The writable-dirs must be an array.'); |
| 153 |
|
return $configuration['writable-dirs']; |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
/** |
| 157 |
|
* returns a list of writeable files specified in the writeable-files composer extra options |
|
@@ 162-169 (lines=8) @@
|
| 159 |
|
* @param Event $event |
| 160 |
|
* @return array an array of file paths |
| 161 |
|
*/ |
| 162 |
|
public static function getWritableFiles(Event $event) { |
| 163 |
|
$configuration = $event->getComposer()->getPackage()->getExtra(); |
| 164 |
|
if (!isset($configuration['writable-files'])) |
| 165 |
|
throw new \Exception('The writable-files must be specified in composer arbitrary extra data.'); |
| 166 |
|
if (!is_array($configuration['writable-files'])) |
| 167 |
|
throw new \Exception('The writable-files must be an array.'); |
| 168 |
|
return $configuration['writable-files']; |
| 169 |
|
} |
| 170 |
|
|
| 171 |
|
/** |
| 172 |
|
* Sets Writrable Directory permissions for any directories listed in the writeable-dirs option using setfacl |