Skip to content

Commit 6a919d4

Browse files
committed
default to current dir
1 parent a8cb5b2 commit 6a919d4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/initDevTools.m

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ function initDevTools(repoName,currentDir)
88
% INPUT:
99
% repoName: Name of the repository for which the devTools shall
1010
% be configured (default: `opencobra/cobratoolbox`)
11-
% .. Author:
12-
% - Laurent Heirendt
11+
% .. Authors:
12+
% - Laurent Heirendt, Ronan Fleming
1313

1414
global gitConf
1515
global gitCmd
@@ -20,7 +20,9 @@ function initDevTools(repoName,currentDir)
2020
if ~exist('repoName', 'var')
2121
repoName = DEFAULTREPONAME;
2222
end
23-
23+
if ~exist('currentDir', 'var')
24+
currentDir = pwd;
25+
end
2426
resetDevToolsFlag = true;
2527

2628
finishup = onCleanup(@() resetDevTools());
@@ -97,6 +99,7 @@ function initDevTools(repoName,currentDir)
9799
% retrieve the directory of the fork from the local git configuration
98100
[~, result_gitConfForkDirGet] = system(['git config --get user.', gitConf.leadForkDirName, gitConf.nickName, '.path']);
99101
if isempty(result_gitConfForkDirGet)
102+
fprintf('%s%s%s\n','Attempting to progress by assuming the current directory (', currentDir, ') is a fork directory.')
100103
gitConf.fullForkDir=currentDir;
101104
gitConf.localDir = gitConf.fullForkDir;
102105
else

0 commit comments

Comments
 (0)