Skip to content

Run dev:keep-calm --force-static-content-deploy in non production mode #1816

@c-walter

Description

@c-walter

Describe the bug

When running the command magerun2 dev:keep-calm --force-static-content-deploy I see an error

In DeployStaticContentCommand.php line 159:

  NOTE: Manual static content deployment is not required in "default" and "developer" modes.
  In "default" and "developer" modes static contents are being deployed automatically on demand.
  If you still want to deploy in these modes, use -f option: 'bin/magento setup:static-content:deploy -f'

as result. In the summary the setup:static-content:deploy step is also marked as failed.

Expected behaviour

The magerun2 dev:keep-calm --force-static-content-deploy command forwards my input to the bin/magento command like this bin/magento setup:static-content:deploy -f

Steps to reproduce the issue

  1. Install a plain magento
  2. Switch mode to "non production" e.g. 'developer'
  3. Run magerun2 dev:keep-calm --force-static-content-deploy

Technical details

  • Host Machine OS (Windows/Linux/Mac): Mac

Possible Fix

In https://github.com/netz98/n98-magerun2/blob/develop/src/N98/Magento/Command/Developer/KeepCalmCommand.php#L181 the runCommand does not get the input object or any information about the option --force-static-content-deploy. Maybe the variable https://github.com/netz98/n98-magerun2/blob/develop/src/N98/Magento/Command/Developer/KeepCalmCommand.php#L153 should be handed to the runCommand

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions