Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Dec 9, 2024
2 parents f5aef82 + e66f4ef commit a0f2a7c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions App/Commands/ModuleInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,29 @@ public function config()

public function handle()
{
// check name
$name = $this->option('name');
while (!$name) $name = $this->ask("Please enter the module's name");

wire()->modules->refresh();

// special case for RockMigrations
if ($name == 'RockMigrations') {
$rm = wire()->modules->get('RockMigrations');
if (!$rm) {
$this->error("RockMigrations module not found");
return self::FAILURE;
}
return self::SUCCESS;
}

// load RockMigrations
$rm = wire()->modules->get('RockMigrations');
if (!$rm) {
$this->error("RockMigrations module not found");
return self::FAILURE;
}

// check name
$name = $this->option('name');
while (!$name) $name = $this->ask("Please enter the module's name");

// install module
$rm->installModule($name);

Expand Down
2 changes: 1 addition & 1 deletion Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Application extends ConsoleApplication
* Path to root folder of the project having a trailing slash
* @var string $root
*/
private $root;
public $root;

public function __construct($name = "RockShell", $version = null)
{
Expand Down

0 comments on commit a0f2a7c

Please sign in to comment.