bash-tricks icon indicating copy to clipboard operation
bash-tricks copied to clipboard

Check whether is inside a git directory before running cdp

Open ghost opened this issue 6 years ago • 0 comments

When called outside of a git directory the cdp function would enter an infinite loop. Just included a conditional to check whether if it is or not inside a git repo, case not just output a message to stdout and return 1.

ghost avatar Dec 02 '19 17:12 ghost