From e570ec23df0f85d5d0ce1fdaa04f8093804fa91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20H=2E=20Fjeld?= Date: Thu, 21 Nov 2024 11:25:28 +0100 Subject: [PATCH 1/3] chore: Update .gitignore with .aider and .env files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6f8bafc5f..4fc4f9c53 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ .vscode node_modules coverage +.aider* +.env From 0767af8df43ab849dcb6fb932789051c0fa095d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20H=2E=20Fjeld=20=28aider=29?= Date: Thu, 21 Nov 2024 12:14:21 +0100 Subject: [PATCH 2/3] feat: Add helpful hint for git command failures in repository installer --- src/installer/repository.cr | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/installer/repository.cr b/src/installer/repository.cr index 3e5c2aa6d..82f51ed84 100644 --- a/src/installer/repository.cr +++ b/src/installer/repository.cr @@ -63,6 +63,12 @@ module Mint block do bold error.to_s.strip end + + block do + text "Hint: Run " + bold "mint tool clean; mint tool clean --package-cache" + text " to reset local state, and then try again." + end end unless status.success? output @@ -138,6 +144,12 @@ module Mint block do bold error.to_s.strip end + + block do + text "Hint: Run " + bold "mint tool clean; mint tool clean --package-cache" + text " to reset local state, and then try again." + end end unless status.success? terminal.puts " #{CHECKMARK} Updated #{id}" @@ -158,6 +170,12 @@ module Mint block do bold error.to_s.strip end + + block do + text "Hint: Run " + bold "mint tool clean; mint tool clean --package-cache" + text " to reset local state, and then try again." + end end unless status.success? terminal.puts " #{CHECKMARK} Cloned #{id}" From 1da25244168ed54e8a0becf0b64f634dd92dded3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20H=2E=20Fjeld?= Date: Thu, 21 Nov 2024 13:37:16 +0100 Subject: [PATCH 3/3] test: Adjust to improved git error hint --- spec/installer/repository_spec.cr | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/installer/repository_spec.cr b/spec/installer/repository_spec.cr index 6aa5dd165..41269a0ec 100644 --- a/spec/installer/repository_spec.cr +++ b/spec/installer/repository_spec.cr @@ -56,6 +56,9 @@ describe "Repository" do 0.1.0 0.2.0 + + Hint: Run mint tool clean; mint tool clean --package-cache to reset local + state, and then try again. MESSAGE begin @@ -98,6 +101,9 @@ describe "Repository" do The error I got from the git command is this: cloned + + Hint: Run mint tool clean; mint tool clean --package-cache to reset local + state, and then try again. MESSAGE begin @@ -119,6 +125,9 @@ describe "Repository" do The error I got from the git command is this: fetched + + Hint: Run mint tool clean; mint tool clean --package-cache to reset local + state, and then try again. MESSAGE begin