Skip to content

Commit 20d9d37

Browse files
committed
Fixed: Correctly handle DPATH
1 parent b189df0 commit 20d9d37

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

source/redub/api.d

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -854,14 +854,17 @@ string getDubWorkspacePath()
854854
if(dPath)
855855
{
856856
customHome = getEnvVariable("DUB_HOME");
857-
if(!isAbsolute(customHome))
857+
if(customHome.length && !isAbsolute(customHome))
858858
throw new RedubException("DUB_HOME must not be an absolute path '"~customHome~"' when DPATH is defined ["~dPath~"]");
859-
home = buildNormalizedPath(dPath, getEnvVariable("DUB_HOME"));
859+
if(!customHome)
860+
home = buildNormalizedPath(dPath, "dub");
861+
else
862+
home = buildNormalizedPath(dPath, customHome);
860863
}
861864
else
862865
{
863866
customHome = getEnvVariable("DUB_HOME");
864-
if(customHome)
867+
if(customHome.length)
865868
home = customHome;
866869
else
867870
home = getEnvVariable(home);

0 commit comments

Comments
 (0)