File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,17 @@ const CustomHardLinkStep = struct {
177177 const builder = self .builder ;
178178
179179 const wrapmain_path = self .exe .getEmittedBin ().getPath (builder );
180+ var madeDir = false ;
180181 inline for (EXECUTABLES ) | exec_decl | {
181182 const exec_name = exec_decl .@"0" ;
182183 const full_dest_path = builder .getInstallPath (.{ .bin = {} }, exec_name );
183- std .debug .print ("{s} -> {s}\n " , .{ wrapmain_path , full_dest_path });
184+ if (! madeDir ) {
185+ const dirpath = std .fs .path .dirname (full_dest_path ).? ;
186+ std .debug .print ("mkdir -p {s}\n " , .{dirpath });
187+ try std .fs .Dir .makePath (std .fs .cwd (), dirpath );
188+ madeDir = true ;
189+ }
190+ std .debug .print ("symlink {s} to {s}\n " , .{ wrapmain_path , full_dest_path });
184191 try std .fs .cwd ().atomicSymLink (wrapmain_path , full_dest_path , .{});
185192 }
186193 }
You can’t perform that action at this time.
0 commit comments