fn scriptCommandLine(self: *WindowsCommandLineCache, script_path: []const u16) ![:0]u16 self: *WindowsCommandLineCachescript_path: []const u1616702
16703
16704
16705
16706
16707
16708
16709
16710 fn scriptCommandLine(self: *WindowsCommandLineCache, script_path: []const u16) ![:0]u16 {
if (self.script_cmd_line) |v| self.allocator.free(v);
self.script_cmd_line = try argvToScriptCommandLineWindows(
self.allocator,
script_path,
self.argv[1..],
);
return self.script_cmd_line.?;
}
Not cached, since the path to the batch script will change during PATH searching.
script_pathshould be as qualified as possible, e.g. if the PATH is being searched, then script_path should include both the search path and the script filename (this allows avoiding cmd.exe having to search the PATH again).