Skip to content

Commit

Permalink
Update the dvm-current/default-dc wrappers for the new directory stru…
Browse files Browse the repository at this point in the history
…cture.
  • Loading branch information
jacob-carlborg committed Sep 1, 2014
1 parent 37631dd commit a818aa6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dvm/commands/Use.d
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private:

void installWrapper ()
{
wrapper.target = join(options.path.compilers, "dmd-" ~ args.first, options.path.bin, "dmd" ~ options.path.executableExtension).assumeUnique;
wrapper.target = wrapperTarget(args.first);
wrapper.path = join(options.path.dvm, options.path.bin, "dvm-current-dc" ~ options.path.scriptExtension).assumeUnique;

verbose("Installing wrapper: " ~ wrapper.path);
Expand Down Expand Up @@ -143,6 +143,15 @@ private:

return envPath_ = native(join(options.path.env, "dmd-" ~ args.first ~ options.path.scriptExtension)).assumeUnique;
}

string wrapperTarget (string compilerVersion)
{
auto basePath = join(options.path.compilers, "dmd-" ~ compilerVersion);
auto executable = "dmd" ~ options.path.executableExtension;
auto path = join(basePath, options.platform, options.path.bin, executable);

return exists(path) ? path : join(basePath, options.path.bin, executable);
}
}

template UseImpl ()
Expand Down

0 comments on commit a818aa6

Please sign in to comment.