Skip to content

Check target platform version in @liferay/cliΒ #1006

Open
@izaera

Description

@izaera

πŸ‘€ Please check the troubleshooting guide before reporting anything. It contains important information on how to fix or diagnose errors.

Issue type (mark with x)

  • πŸ€” Question
  • πŸ› Bug report
  • 🎁 Feature request
  • πŸ€·β€β™€οΈ Other

Version (mark with x)

  • 2️⃣ v2.x
  • 3️⃣ v3.x

Description

Currently @liferay/cli delegates its commands in the target platform of the project (portal-base, portal-adapt-base, etc...).

This setup can break if the user runs a newer @liferay/cli version with an older target platform version, because some of the commands offered by @liferay/cli won't be available.

We should introduce some mechanism to:

  1. Check if a newer version of the target platform exists and notify the user accordingly
  2. If the user insists in running a newer @liferay/cli with an older target platform, fail gracefully if a command that is not available is run.

Number 2 can be very difficult to achieve (especially for flags like --configure and such) so we may simply warn the user if he doesn't update the target platform that some of the commands may be unstable. Another option could be delegating the command execution and help to the target platform too and leave @liferay/cli almost empty except for the project generation and upgrade parts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions