diff --git a/git-portfolio b/git-portfolio index 3b5d615..895c0d7 100755 --- a/git-portfolio +++ b/git-portfolio @@ -6,6 +6,10 @@ if [ -d "$repos" ]; then fi mkdir -p "$repos" tmp_portfolio="/tmp/portfolio-$(cat /dev/urandom | base64 | tr -d '=+/' | head -c 8)" +if [ -d "$tmp_portfolio" ]; then + echo "Error: Temporary directory '$tmp_portfolio' already exists." + exit 1 +fi function safely_remove_tmp_repos() { if [ "$repos" ] && [ -d "$repos" ]; then if [ "$(find -name .git -type d | wc -l)" -eq 0 ]; then