diff --git a/source/dub/generators/build.d b/source/dub/generators/build.d index f94f2376a..9db95a638 100644 --- a/source/dub/generators/build.d +++ b/source/dub/generators/build.d @@ -692,6 +692,8 @@ class BuildGenerator : ProjectGenerator { runcwd = NativePath(buildsettings.workingDirectory); if (!runcwd.absolute) runcwd = cwd ~ runcwd; } + if(!existsDirectory(runcwd)) + ensureDirectory(runcwd); if (!exe_file_path.absolute) exe_file_path = cwd ~ exe_file_path; runPreRunCommands(m_project.rootPackage, m_project, settings, buildsettings); logInfo("Running", Color.green, "%s %s", exe_file_path.relativeTo(runcwd), run_args.join(" "));