* don't add target_info.unit_env to the unit search path

if it's not set/empty

git-svn-id: trunk@8931 -
This commit is contained in:
Jonas Maebe 2007-10-25 19:30:48 +00:00
parent f91f060acb
commit 81c5abfb72

View File

@ -2079,6 +2079,7 @@ end;
procedure read_arguments(cmd:string);
var
env: ansistring;
i : tfeature;
begin
option:=coption.create;
@ -2344,7 +2345,11 @@ begin
if inputfilepath<>'' then
Unitsearchpath.AddPath(inputfilepath,true);
if not disable_configfile then
UnitSearchPath.AddPath(GetEnvironmentVariable(target_info.unit_env),false);
begin
env:=GetEnvironmentVariable(target_info.unit_env);
if env<>'' then
UnitSearchPath.AddPath(GetEnvironmentVariable(target_info.unit_env),false);
end;
{$ifdef Unix}
fpcdir:=FixPath(GetEnvironmentVariable('FPCDIR'),false);