File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ def tag(ctx: Context) -> None:
372372 message_box ("Tagging..." )
373373 result = ctx .run ("git rev-parse --abbrev-ref HEAD" , hide = "both" )
374374
375- if result .stdout .strip () != "develop" : # pyright: ignore
375+ if result is None or result .stdout .strip () != "develop" :
376376 error = "Are you still on a feature or master branch?"
377377
378378 raise RuntimeError (error )
@@ -398,7 +398,12 @@ def tag(ctx: Context) -> None:
398398 version = f"{ major_version } .{ minor_version } .{ change_version } "
399399
400400 result = ctx .run ("git ls-remote --tags upstream" , hide = "both" )
401- remote_tags = result .stdout .strip ().split ("\n " ) # pyright: ignore
401+ if result is None :
402+ error = "Failed to list remote tags."
403+
404+ raise RuntimeError (error )
405+
406+ remote_tags = result .stdout .strip ().split ("\n " )
402407 tags = set ()
403408 for remote_tag in remote_tags :
404409 tags .add (remote_tag .split ("refs/tags/" )[1 ].replace ("refs/tags/" , "^{}" ))
You can’t perform that action at this time.
0 commit comments