@@ -40,7 +40,7 @@ def _get_git_config_scope_arg(local):
40
40
def get_current_branch_name ():
41
41
try :
42
42
output = subprocess .check_output ([_GIT_EXE , 'symbolic-ref' , '--short' , '-q' , 'HEAD' ])
43
- except subprocess . CalledProcessError as ex :
43
+ except Exception as ex :
44
44
logging .info ('GitDetect: Could not detect current branch based on current working directory.' )
45
45
logging .exception (ex )
46
46
return None
@@ -71,7 +71,7 @@ def get_git_credentials(team_instance):
71
71
standard_in = bytes ('protocol={protocol}\n host={host}' .format (protocol = protocol , host = host ), 'utf-8' )
72
72
try :
73
73
output = subprocess .check_output ([_GIT_EXE , 'credential-manager' , 'get' ], input = standard_in )
74
- except subprocess . CalledProcessError as ex :
74
+ except Exception as ex :
75
75
logging .info ('GitDetect: Could not detect git credentials for current working directory.' )
76
76
logging .exception (ex )
77
77
return None
@@ -98,7 +98,7 @@ def get_git_remotes():
98
98
# origin https://mseng.visualstudio.com/defaultcollection/VSOnline/_git/VSO (fetch)
99
99
# origin https://mseng.visualstudio.com/defaultcollection/VSOnline/_git/VSO (push)
100
100
output = subprocess .check_output ([_GIT_EXE , 'remote' , '-v' ], stderr = subprocess .STDOUT )
101
- except subprocess . CalledProcessError as ex :
101
+ except Exception as ex :
102
102
logging .info ('GitDetect: Could not detect current remotes based on current working directory.' )
103
103
logging .exception (ex )
104
104
return None
0 commit comments