Skip to content

Conversation

lemonlambda
Copy link
Contributor

Errors and exits when you have not stagei anything with git.

(For Octoberfest)

@alt-art
Copy link
Owner

alt-art commented Oct 4, 2022

The code is not formatted, and the comparison will always be true because it will always return a response.
And you can use anyhow to send the message like this

return Err(anyhow!(
    "You have to stage your changes before committing, use `git add`"
));

@alt-art
Copy link
Owner

alt-art commented Oct 4, 2022

Tip: you need to verify the exit code number

@lemonlambda
Copy link
Contributor Author

I have made the changes

@alt-art
Copy link
Owner

alt-art commented Oct 4, 2022

you need to format your code, use cargo fmt

@lemonlambda
Copy link
Contributor Author

Done

@alt-art alt-art self-requested a review October 6, 2022 16:29
@alt-art alt-art merged commit b8a9948 into alt-art:main Oct 6, 2022
@alt-art alt-art added the hacktoberfest-accepted Hacktoberfest accepted contributions label Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Hacktoberfest accepted contributions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants