Skip to content

Commit

Permalink
Work around issue with dub and symlinks from zipfiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
schveiguy committed Sep 23, 2022
1 parent e230e57 commit 453bb8c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion install/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import std.system;
import std.format;
import std.conv;
import std.process;
import std.string;
import iopipe.json.serialize;
import iopipe.json.parser;
import std.exception;
Expand Down Expand Up @@ -78,7 +79,7 @@ int main()
writeln("Copying library files from ", libpath);
foreach(ent; dirEntries(libpath, SpanMode.shallow))
{
auto newLoc = buildPath(".", ent.name.baseName);
auto newLoc = buildPath(".", ent.name.baseName(".lnk"));
version(Posix)
{
if(ent.isSymlink)
Expand All @@ -89,6 +90,15 @@ int main()
symlink(origln, newLoc);
continue;
}
else if(ent.name.endsWith(".lnk"))
{
// dub workaround. This is really a symlink but wasn't
// properly downloaded by dub.
auto origln = cast(char[])read(ent.name);
writefln("Creating symlink %s -> %s", newLoc, origln);
symlink(origln, newLoc);
continue;
}
}
writeln("Installing library file ", newLoc);
copy(ent.name, newLoc, PreserveAttributes.yes);
Expand Down

0 comments on commit 453bb8c

Please sign in to comment.