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

Correctly log error message when pkg-install fails #348

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jburianek
Copy link

Original PR: iocage#1270


If pkg-install fails, we should ignore blank lines when attempting to send back a helpful error message to the user.

This is because e.message can look something like this:

[b"pkg: No packages available to install matching 'fake-package' have been found in the repositories\n", b'', b'', b'']

Which leads to a very unhelpful error message like this:

Installing plugin packages:
  - fake-package... 
    - fake-package failed to install, retry #1
    - fake-package failed to install, retry #2
    - fake-package failed to install, retry #3

pkg error:
  - fake-package :

After this change the message is propagated back to the user:

Installing plugin packages:
  - fake-package... 
    - fake-package failed to install, retry #1
    - fake-package failed to install, retry #2
    - fake-package failed to install, retry #3

pkg error:
  - fake-package :pkg: No packages available to install matching 'fake-package' have been found in the repositories

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