Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check target platform version in @liferay/cli #1006

Open
2 of 6 tasks
izaera opened this issue Sep 20, 2022 · 0 comments
Open
2 of 6 tasks

Check target platform version in @liferay/cli #1006

izaera opened this issue Sep 20, 2022 · 0 comments

Comments

@izaera
Copy link
Member

izaera commented Sep 20, 2022

πŸ‘€ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant