Skip to content

Commit 72b935f

Browse files
author
Marius Burkard
committed
- added --force option for addon installer
1 parent ad447c2 commit 72b935f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/addons.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
$action = '';
4646
$package = '';
47+
$force = false;
4748

4849
$argv = $_SERVER['argv'];
4950
for($a = 1; $a < count($argv); $a++) {
@@ -52,6 +53,8 @@
5253
$action = 'install';
5354
} elseif($argv[$a] === '--uninstall' || $argv[$a] === 'uninstall') {
5455
$action = 'uninstall';
56+
} elseif($argv[$a] === '--force') {
57+
$force = true;
5558
} elseif(substr($argv[$a], -4) === '.pkg' && is_file($argv[$a])) {
5659
$package = $argv[$a];
5760
} else {
@@ -63,7 +66,7 @@
6366
die('Automatic uninstall not supported, yet.');
6467
} else {
6568
try {
66-
$app->addon_installer->installAddon($package);
69+
$app->addon_installer->installAddon($package, $force);
6770
} catch(Exception $e) {
6871
die('Error: ' . $e->getMessage() . "\n");
6972
}

0 commit comments

Comments
 (0)