Skip to content

Commit 6dd8518

Browse files
committed
Only add update & rollback commands when in phar mode
1 parent f7ad025 commit 6dd8518

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

app/config.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@
4646
->setDescription('Search for a PHP School workshop.');
4747
$application->command('installed', ListWorkshops::class, ['show'])
4848
->setDescription('List installed PHP School workshops.');
49-
$application->command('self-update', SelfUpdate::class)
50-
->setDescription('Update the workshop manager to the latest version.');
51-
$application->command('rollback', SelfRollback::class)
52-
->setDescription('Rollback the workshop manager to the previous version.');
49+
50+
if (extension_loaded('phar') && Phar::running()) {
51+
$application->command('self-update', SelfUpdate::class)
52+
->setDescription('Update the workshop manager to the latest version.');
53+
$application->command('rollback', SelfRollback::class)
54+
->setDescription('Rollback the workshop manager to the previous version.');
55+
}
56+
5357
$application->command('verify', VerifyInstall::class, ['validate'])
5458
->descriptions('Verify your installation is working correctly');
5559

0 commit comments

Comments
 (0)