diff --git a/src/alr/alr-commands-get.adb b/src/alr/alr-commands-get.adb index cc040e5cc..1b5f443d4 100644 --- a/src/alr/alr-commands-get.adb +++ b/src/alr/alr-commands-get.adb @@ -351,7 +351,9 @@ package body Alr.Commands.Get is else Reportaise_Command_Failed ("Crate [" & Allowed.Crate.As_String - & "] does not exist in the index."); + & "] does not exist in the index. " + & "Use `alr search " & Allowed.Crate.As_String + & "` for similar names."); end if; end if; diff --git a/testsuite/tests/get/get-not-found/test.py b/testsuite/tests/get/get-not-found/test.py index f59e890b1..82221d88c 100644 --- a/testsuite/tests/get/get-not-found/test.py +++ b/testsuite/tests/get/get-not-found/test.py @@ -10,7 +10,7 @@ p = run_alr('get', 'does_not_exist', complain_on_error=False) assert_eq(1, p.status) -assert_match('.*Crate \[does_not_exist\] does not exist in the index\.\n', +assert_match('.*Crate \[does_not_exist\] does not exist in the index\..*\n', p.out) assert_eq([], glob('does_not_exist*')) diff --git a/testsuite/tests/get/provides/test.py b/testsuite/tests/get/provides/test.py index 86e835e84..b56d9e08a 100644 --- a/testsuite/tests/get/provides/test.py +++ b/testsuite/tests/get/provides/test.py @@ -19,7 +19,7 @@ # Check the error for a truly unknown crate: assert_eq("""\ -ERROR: Crate [unobtanium] does not exist in the index. +ERROR: Crate [unobtanium] does not exist in the index. Use `alr search unobtanium` for similar names. """, run_alr("get", "unobtanium", "--dirname", complain_on_error=False).out) diff --git a/testsuite/tests/index/external-hint/test.py b/testsuite/tests/index/external-hint/test.py index 2436f2a9e..f926d82b9 100644 --- a/testsuite/tests/index/external-hint/test.py +++ b/testsuite/tests/index/external-hint/test.py @@ -2,13 +2,10 @@ Test the hinting with custom text in external definitions """ -from glob import glob - from drivers.alr import distro_is_known, run_alr from drivers.asserts import assert_eq, assert_match import re -import platform # 1st test: directly attempting to retrieve an external (this is doable for # system externals in supported platforms -- never in this test). Depending on