Skip to content

Commit 339cdfc

Browse files
author
jaib1
committed
updated git.update for case where git exe can't be found
1 parent f3fc112 commit 339cdfc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cortexlab/+git/update.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ function update(scheduled)
3636
% Get the path to the Git exe
3737
gitexepath = getOr(dat.paths, 'gitExe');
3838
if isempty(gitexepath)
39-
[~,gitexepath] = system('where git'); % todo: this doesn't always work
39+
[status, gitexepath] = system('where git');
40+
if status == 1
41+
error(['Could not find the git .exe location. Please find and ',...
42+
'add the location to the "dat.paths" file. For example, like so:',...
43+
' p.gitExe = ''C:\Program Files\Git\cmd\git.exe''']);
44+
end
4045
end
4146
gitexepath = ['"', strtrim(gitexepath), '"'];
4247

0 commit comments

Comments
 (0)