From 3eb8b3da81798edadd65f93476dc1de08d78839a Mon Sep 17 00:00:00 2001 From: Semantic Versioner Date: Sat, 22 Jul 2023 05:15:27 -0400 Subject: [PATCH] GitHub Actions Iterations --- semver/scm/git.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/semver/scm/git.py b/semver/scm/git.py index 80f76d4..cc1255a 100644 --- a/semver/scm/git.py +++ b/semver/scm/git.py @@ -29,7 +29,7 @@ class Git(SCM): def _run_command( self, *args: str, throwExceptions: bool = True - ) -> subprocess.CompletedProcess[str]: + ) -> subprocess.CompletedProcess: return subprocess.run( args, capture_output=True, @@ -82,7 +82,11 @@ class Git(SCM): f"Error getting latest tagged git version: {str(e.stderr).rstrip()}" ) - if len(tagged_versions) > 0 and tagged_versions[-1] != "": + if ( + tagged_versions is not None + and len(tagged_versions) > 0 + and tagged_versions[-1] != "" + ): version = tagged_versions[-1] logger.debug(f"Tag Version: {version}")