Skip to content

[BUG] Package fails to install in production #53

@bgmastermind

Description

@bgmastermind

A common scenario:

  1. On your dev machine you do composer require lwwcas/laravel-countries
  2. Then do php artisan w-countries:install . Start using the package add your code. Test and all is good.
  3. Then you go and deploy on production. Migrations are transferred and completed as expected.
  4. Now you know that you need to run php artisan w-countries:install for the seeders, but it doesn't work.

In Trait\WithLanguages.php
There is this code

  $this->comment('Running languages...');
        foreach ($filteredLanguages as $language => $class) {
            $this->callSilently('db:seed', [
                '--class' => $class,
            ]);
            $this->comment("{$language} executed successfully.");
        }

Which hangs until you press enter. In order to make it work I've changed callSilently to call
which led to this screenshot where you see the reason
Image

When running in production you have to confirm the seed, but you don't see the prompt when calling silently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions