We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc11f8b commit 9fa12c0Copy full SHA for 9fa12c0
commitizen/cz/utils.py
@@ -21,10 +21,17 @@ def strip_local_version(version: str) -> str:
21
22
23
def get_backup_file_path() -> str:
24
+ project_root = git.find_git_project_root()
25
+
26
+ if project_root is None:
27
+ project = ""
28
+ else:
29
+ project = project_root.as_posix().replace("/", "%")
30
31
return os.path.join(
32
tempfile.gettempdir(),
- "cz.commit%{user}%{project_root}.backup".format(
33
+ "cz.commit%{user}%{project}.backup".format(
34
user=os.environ.get("USER", ""),
- project_root=str(git.find_git_project_root()).replace("/", "%"),
35
+ project=project,
36
),
37
)
0 commit comments