Switch to strcmp

This commit is contained in:
2024-07-31 22:06:33 -04:00
parent 56ab318bf6
commit 0fe61b1db7

View File

@@ -98,18 +98,18 @@ function varargout = EASYconsole(varargin)
% User sanity check and warning
if ~isempty(getenv('PROJECT_USER'))
if ~equal(getenv('PROJECT_USER'), userName)
if ~strcmp(getenv('PROJECT_USER'), userName)
disp("WARNING: PROJECT_USER does not match the current namespace");
end
end
% Allow module to override hardcoded default EASY directory
if ~isempty(getenv('EASY_DIR'))
EASY_DIR=fullfile(getenv('EASY_DIR'));
if ~strcmp(easyDir, EASY_DIR) % sanity check
ed=fullfile(getenv('EASY_DIR'));
if ~strcmp(easyDir, ed) % sanity check
disp("WARNING: EASY_DIR does not match this script's hardcoded EASY location");
disp("This is probably OK but if strange beahvior arises, we'll need to fix it in code");
easyDir=EASY_DIR;
disp("This is probably OK but this pathway is not well-tested");
easyDir=ed;
end
fprintf('Using EASY script directory: %s from environment variable EASY_DIR\n', easyDir);
else