Skip to content

Commit

Permalink
updated git.update for case where git exe can't be found
Browse files Browse the repository at this point in the history
  • Loading branch information
jaib1 committed Apr 18, 2019
1 parent f3fc112 commit 339cdfc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cortexlab/+git/update.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ function update(scheduled)
% Get the path to the Git exe
gitexepath = getOr(dat.paths, 'gitExe');
if isempty(gitexepath)
[~,gitexepath] = system('where git'); % todo: this doesn't always work
[status, gitexepath] = system('where git');
if status == 1
error(['Could not find the git .exe location. Please find and ',...
'add the location to the "dat.paths" file. For example, like so:',...
' p.gitExe = ''C:\Program Files\Git\cmd\git.exe''']);
end
end
gitexepath = ['"', strtrim(gitexepath), '"'];

Expand Down

0 comments on commit 339cdfc

Please sign in to comment.