diff --git a/source/dub/generators/generator.d b/source/dub/generators/generator.d index 2579880..72282f7 100644 --- a/source/dub/generators/generator.d +++ b/source/dub/generators/generator.d @@ -1053,7 +1053,7 @@ env["DC_BASE"] = settings.platform.compiler; env["D_FRONTEND_VER"] = to!string(settings.platform.frontendVersion); - env["DUB_EXE"] = getDUBExePath(settings.platform.compilerBinary); + env["DUB_EXE"] = getDUBExePath(settings.platform.compilerBinary).toNativeString(); env["DUB_PLATFORM"] = join(settings.platform.platform, " "); env["DUB_ARCH"] = join(settings.platform.architecture, " "); diff --git a/source/dub/internal/utils.d b/source/dub/internal/utils.d index de3bf2a..28127ef 100644 --- a/source/dub/internal/utils.d +++ b/source/dub/internal/utils.d @@ -381,11 +381,11 @@ Throws: an Exception if no valid DUB executable is found */ -public string getDUBExePath(in string compilerBinary=null) +public NativePath getDUBExePath(in string compilerBinary=null) { version(DubApplication) { import std.file : thisExePath; - return thisExePath(); + return NativePath(thisExePath()); } else { // this must be dub as a library @@ -418,7 +418,7 @@ .filter!exists; enforce(!dubLocs.empty, "Could not find DUB executable"); - return dubLocs.front.array; + return NativePath(dubLocs.front.array); } } diff --git a/source/dub/project.d b/source/dub/project.d index fcc2b6a..b22f73d 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -1569,7 +1569,7 @@ } if (name == "DUB") { - return getDUBExePath(gsettings.platform.compilerBinary); + return getDUBExePath(gsettings.platform.compilerBinary).toNativeString(); } if (name == "ARCH") {