We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a697c1 commit ad4ab1eCopy full SHA for ad4ab1e
1 file changed
script.py
@@ -45,8 +45,14 @@ def get_local_commit():
45
else:
46
print(f"Error getting local commit: {result.stderr}")
47
return None
48
- except Exception as e:
49
- print(f"Exception getting local commit: {e}")
+ except FileNotFoundError as e:
+ print(f"File not found error: {e}. Ensure the 'git' executable and the repository path exist.")
50
+ return None
51
+ except PermissionError as e:
52
+ print(f"Permission error: {e}. Check your access rights to the repository path.")
53
54
+ except subprocess.SubprocessError as e:
55
+ print(f"Subprocess error: {e}. An issue occurred while running the 'git' command.")
56
57
58
0 commit comments