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

Improve error handling #18

Merged
merged 1 commit into from
Mar 30, 2023
Merged

Improve error handling #18

merged 1 commit into from
Mar 30, 2023

Conversation

juliogonzalez
Copy link
Member

Check if -l is a Git repository

$ ./uyuni-docs-helper -l /tmp -c blah -p suma
[ERROR] /tmp is not a Git repository

If there are errors, show the output folder as part of an error, and specify that it could have or could not have stuff.

$ ./uyuni-docs-helper -l ../uyuni-docs -c blah -p suma
[INFO] Output will be stored at ../uyuni-docs/build
[INFO] Pulling the latest container image...
Trying to pull docker.io/juliogonzalez/uyuni-docs:latest...
[....]
789f2706ec7a85c12b43e9a27d67afef60e6c7744328ad5e363453c91fd5782a
[INFO] Bulding the doc...
WARN[0000] Path "/etc/SUSEConnect" from "/etc/containers/mounts.conf" doesn't exist, skipping 
WARN[0000] Path "/etc/zypp/credentials.d/SCCcredentials" from "/etc/containers/mounts.conf" doesn't exist, skipping 
====================================================================
 Git repository: A folder from outside the container is being used
 Product: suma
 Make command: blah
====================================================================
./configure suma
Config file loaded successfully
Creating Makefile for each language..
Makefiles successfully created
Including new Makefiles in Makefile.lang
Creating new target using books target..
Creating new target using language target..
Creating entities.adoc
Creating parameters specific for suma for entities file..
Creating site.yml.
Creating parameters specific for suma in site.yml
Creating parameters specific for suma in antora.yml
Configuration Completed!
make: *** No rule to make target 'blah'.  Stop.
[ERROR] There were errors! Please review the log!
[ERROR] Depending on the error, there could also be build outputs at ../uyuni-docs/build

Fixes #17

Copy link
Contributor

@jcayouette jcayouette left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks 👍

Copy link
Contributor

@raulillo82 raulillo82 left a comment

Choose a reason for hiding this comment

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

LGTM!

@juliogonzalez juliogonzalez merged commit ca05a22 into main Mar 30, 2023
@juliogonzalez juliogonzalez deleted the 17 branch March 30, 2023 08:34
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.

Using a directory rather than a repository with --localclone does not exit or throw a sane error
3 participants