Skip to content

Commit 09132a1

Browse files
committed
Don't update if core assemblies have already been added to the path
1 parent 99a91d0 commit 09132a1

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/main/matlab/main.m

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ function main()
66
busy.go();
77
deleteBusy = onCleanup(@()delete(busy));
88

9-
updater = appbox.GitHubUpdater();
10-
isUpdate = updater.checkForUpdates(App.owner, App.repo, struct('name', App.name, 'version', App.version));
11-
if isUpdate
12-
p = appbox.UpdatePresenter(updater);
13-
p.goWaitStop();
14-
id = p.result;
15-
if ~isempty(id)
16-
matlab.apputil.run(id);
17-
return;
9+
% MATLAB cannot remove .NET assemblies from the path so only update if this is the first run in the session.
10+
if isempty(which('Symphony.Core.SymphonyFramework'))
11+
updater = appbox.GitHubUpdater();
12+
isUpdate = updater.checkForUpdates(App.owner, App.repo, struct('name', App.name, 'version', App.version));
13+
if isUpdate
14+
p = appbox.UpdatePresenter(updater);
15+
p.goWaitStop();
16+
id = p.result;
17+
if ~isempty(id)
18+
matlab.apputil.run(id);
19+
return;
20+
end
1821
end
1922
end
2023

0 commit comments

Comments
 (0)