Open po09i opened 4 years ago
More investigation concluded that the paths need to be updated in a specific way : The following code does not work when ran the normal way using the above procedure however, it does work if adding a breakpoint on the addpath line and continuing the execution. (This also means that doing the each lines manually works)
%% 6) Create a searchable toolbox help database
% Can be used to search for keywords in your published .m-files
fprintf('**********Searchable database generation: **********\n')
if createDB
cd ..
rmpath(genpath('shimming-toolbox'))
addpath(genpath('shimming-toolbox'))
cd shimming-toolbox
builddocsearchdb(pathHelpTOC);
end
It seems like Matlab needs to stop running so that it can register that the paths have updated. Using rehash
does not work. Any Ideas?
hum, that's annoying. However, following on a previous discussion (https://github.com/shimming-toolbox/shimming-toolbox/issues/133#issuecomment-647679436), maybe we can put this issue on hold for now?
builddocsearchdb throws an error the first time the custom toolbox documentation is built if you are on the same folder as info.xml. Current way to fix it is restarting matlab and launching the doc again or rmPath/addPath by going to another folder first.
To reproduce : open Matlab
Quitting matlab and rerunning the commands above fixes the issue.
Then to reproduce, delete these files
and run the commands again.