Skip to content

Report the name of an unreadable directory.#1522

Closed
simonjwright wants to merge 5 commits into
alire-project:masterfrom
simonjwright:report-unwritable-dir
Closed

Report the name of an unreadable directory.#1522
simonjwright wants to merge 5 commits into
alire-project:masterfrom
simonjwright:report-unwritable-dir

Conversation

@simonjwright

Copy link
Copy Markdown
Contributor

While working on a new external, I tried adding my local alire-index before the community index for testing. The error reported was "Not a readable directory". After 2 hours investigation (gdb ...) I realised that I’d been trying to add alr-index rather than alire-index.

This patch (which is in the style of other Outcome_Failure messages) would probably have saved that time!

  * src/alire/alire-index_on_disk.adb (New_Handler.Process_Local_Index):
      If the Path isn't a writable directory (e.g. because it doesn't
      exist), add it to the message in Outcome_Failure.
  * testsuite/tests/index/local-index-not-found/test.py: as summary.
  * testsuite/tests/index/local-index-not-found/test.py: as summary.
 * testsuite/tests/index/local-index-not-found/test.py: the input was
     "no-such-directory", but the output was "./no-such-directory".
     Fix the input to match that.
@simonjwright

Copy link
Copy Markdown
Contributor Author

Sorry, I’ve no idea how to fix this.

  * testsuite/tests/index/local-index-not-found/test.py (comparator): new.
    Use when preparing test condition.
@simonjwright

Copy link
Copy Markdown
Contributor Author

Sorry, this is just not worth it. Abandoned.

@simonjwright simonjwright deleted the report-unwritable-dir branch December 31, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant