Closed adahms closed 3 years ago
Hey @Levi-Leah - this one's on me.
I didn't think to check what happens outside a Git repo during testing of the merge request validator. Not a big problem because PCMD is designed to run inside a Git repo, but could be a good thing for us to add some handling to.
@adahms Didn’t think of that either. I’ll add some error handling
Today, PCMD exits with the following error whenever run outside a Git repository -
This is because the main file (pcmd.py) attempts to import some functions from pcprvalidate.py, which run the following line on load -
We should add some handling so that if it's run outside a Git repository, it silently fails or we tell the user it's not a valid place to run the script.