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

Feature/git error hint #712

Merged
merged 3 commits into from
Nov 23, 2024
Merged

Conversation

jhf
Copy link
Contributor

@jhf jhf commented Nov 21, 2024

Provide a hint for the user to run a cleanup to avoid the errors in #709 if the package state is corrupt for some reason.

Preparation to provoke the error (on macOS):

mint install
rm -rf $TMPDIR/mint-packages/https:/github.com/mint-lang/mint-ui.git/.git/*

The old behaviour - without a hint:

mint install
Mint - Installing dependencies
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Constructing dependency tree...

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

░ ERROR (REPOSITORY_COULD_NOT_UPDATE) ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

I could not update the repository: https://github.com/mint-lang/mint-ui.git

The error I got from the git command is this:

fatal: not a git repository (or any of the parent directories): .git

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
There was an error, exiting...

The new behaviour - with a hint:

mint install
Mint - Installing dependencies
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Constructing dependency tree...

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

░ ERROR (REPOSITORY_COULD_NOT_UPDATE) ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

I could not update the repository: https://github.com/mint-lang/mint-ui.git

The error I got from the git command is this:

fatal: not a git repository (or any of the parent directories): .git

Hint: Run  mint tool clean; mint tool clean --package-cache  to reset local
state, and then try again.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
There was an error, exiting...

@gdotdesign gdotdesign added the enhancement New feature or request label Nov 21, 2024
@gdotdesign gdotdesign added this to the 0.21.0 milestone Nov 21, 2024
@jhf jhf force-pushed the feature/git-error-hint branch from 5ffc317 to 1da2524 Compare November 21, 2024 12:39
@gdotdesign gdotdesign merged commit d6fe730 into mint-lang:master Nov 23, 2024
3 checks passed
block do
text "Hint: Run "
bold "mint tool clean; mint tool clean --package-cache"
text " to reset local state, and then try again."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extraneous space here.

ditto elsewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants