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

Prompt installing for dependencies instead of exiting. #671

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

gdotdesign
Copy link
Member

This PR adds a prompt to install dependencies instead of displaying an error and exiting when dependencies are missing (mint build, mint test, mint start).

This is how the installing looks like:

Mint - Running the development server
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Ensuring dependencies...
 ↳ Not all dependencies in your mint.json file are installed.
   Would you like to install them now? (Y/n)

⚙ Constructing dependency tree...
  ✔ Updated mint-color (https://github.com/mint-lang/mint-color.git)
  ✔ Updated mint-tabler-icons (https://github.com/mint-lang/mint-tabler-icons.git)

⚙ Resolving dependency tree...
  ◈ mint-color ➔ 0.7.0
  ◈ mint-tabler-icons ➔ 1.0.0

⚙ Copying packages...
⚙ Parsing files... 579.817ms
⚙ Development server started on http://127.0.0.1:3000/

This is how the not installing looks like:

Mint - Running the development server
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Ensuring dependencies...
 ↳ Not all dependencies in your mint.json file are installed.
   Would you like to install them now? (Y/n)

⚠ Missing dependencies...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
There was an error, exiting...

Fixes #664

@gdotdesign gdotdesign requested a review from Sija September 19, 2023 07:45
@gdotdesign gdotdesign self-assigned this Sep 19, 2023
@gdotdesign gdotdesign added enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder) labels Sep 19, 2023
@gdotdesign gdotdesign added this to the 0.20.0 milestone Sep 19, 2023
@gdotdesign gdotdesign merged commit f99bd45 into master Sep 19, 2023
@gdotdesign gdotdesign deleted the prompt-install-dependencies branch September 19, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tooling Tooling related feature (formatter, documentation, production builder)
Development

Successfully merging this pull request may close these issues.

Should mint start, mint build, and mint test automatically run mint install?
2 participants