Skip to content

Commit

Permalink
Fix: svutRun failed in environment without Git installed (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpretet committed Sep 12, 2024
1 parent d2b4d62 commit 2d7b883
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions svut/svutRun.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import argparse
import filecmp
import subprocess
import shutil
import datetime
from timeit import default_timer as timer
from datetime import timedelta
Expand Down Expand Up @@ -308,6 +309,11 @@ def get_git_tag():
Return current SVUT version
"""

# Handles an environment without Git installed
git_path = shutil.which("git")
if git_path is None:
return ""

curr_path = os.getcwd()
os.chdir(SCRIPTDIR)

Expand Down

0 comments on commit 2d7b883

Please sign in to comment.