diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 0356c00..71e66c3 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -126,7 +126,6 @@ // parse general options CommonOptions options; LogLevel loglevel = LogLevel.info; - options.root_path = getcwd(); auto common_args = new CommandArgs(args); try { @@ -144,6 +143,15 @@ return 1; } + if (options.root_path.empty) + options.root_path = getcwd(); + else + { + import std.path : absolutePath, buildNormalizedPath; + + options.root_path = options.root_path.absolutePath.buildNormalizedPath; + } + // create the list of all supported commands CommandGroup[] commands = getCommands();