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

Don't show the UI when running CLI commands #2369

Open
Al12rs opened this issue Dec 12, 2024 · 2 comments
Open

Don't show the UI when running CLI commands #2369

Al12rs opened this issue Dec 12, 2024 · 2 comments
Labels
area-cli meta-improvement An issue that improves an existing feature

Comments

@Al12rs
Copy link
Contributor

Al12rs commented Dec 12, 2024

Improvement

Currently

Running any CLI command will either try to connect to an existing process or create a "main" process to execute the command on. The main process will also start and show the UI (with Startup.Main(services, []);).

We want

To avoid displaying the UI if the CLI command does not require it.
E.g.: uninstall-app command should not start the UI, if there is no application running, should instead execute the "main" process headless.
Some commands on the other hand are supposed to start up the UI (e.g. nxm protocol command).

Supporting Information

The reasons for starting/connecting to a separate process when executing a CLI command are:

  • Have a single process handle all commands to have single source of truth and avoid accessing resources separate processes (e.g. applying to the game folder from different processes).
  • Be able to close the started CLI process once the CLI command has completed executing. If the user was to start the app while the command was executing, and we didn't have the two steps approach, the CLI process would not be able to exit after completing, since it is now hosting the UI for the user.

The tricky part is that if a "main" headless process was started for a CLI command, and the user then wanted to start the App with ui, we will need a way to start the UI on the existing main headless process.

@Al12rs Al12rs added the meta-improvement An issue that improves an existing feature label Dec 12, 2024
@Al12rs Al12rs added this to MVP Dec 12, 2024
@MattSturgeon
Copy link
Contributor

MattSturgeon commented Dec 15, 2024

Duplicate of #2179 😉

@halgari
Copy link
Collaborator

halgari commented Dec 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-cli meta-improvement An issue that improves an existing feature
Projects
Status: No status
Development

No branches or pull requests

3 participants