Skip to content

Commit a818aa6

Browse files
Update the dvm-current/default-dc wrappers for the new directory structure.
1 parent 37631dd commit a818aa6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

dvm/commands/Use.d

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private:
6464

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

7070
verbose("Installing wrapper: " ~ wrapper.path);
@@ -143,6 +143,15 @@ private:
143143

144144
return envPath_ = native(join(options.path.env, "dmd-" ~ args.first ~ options.path.scriptExtension)).assumeUnique;
145145
}
146+
147+
string wrapperTarget (string compilerVersion)
148+
{
149+
auto basePath = join(options.path.compilers, "dmd-" ~ compilerVersion);
150+
auto executable = "dmd" ~ options.path.executableExtension;
151+
auto path = join(basePath, options.platform, options.path.bin, executable);
152+
153+
return exists(path) ? path : join(basePath, options.path.bin, executable);
154+
}
146155
}
147156

148157
template UseImpl ()

0 commit comments

Comments
 (0)