Commit 3644e85091
Changed files (1)
lib
lib/std/child_process.zig
@@ -571,7 +571,7 @@ pub const ChildProcess = struct {
// to match posix semantics
const app_name = x: {
if (self.cwd) |cwd| {
- const resolved = try fs.path.resolve(self.allocator, [_][]const u8{ cwd, self.argv[0] });
+ const resolved = try fs.path.resolve(self.allocator, &[_][]const u8{ cwd, self.argv[0] });
defer self.allocator.free(resolved);
break :x try cstr.addNullByte(self.allocator, resolved);
} else {
@@ -613,10 +613,10 @@ pub const ChildProcess = struct {
retry: while (it.next()) |search_path| {
var ext_it = mem.tokenize(PATHEXT, ";");
while (ext_it.next()) |app_ext| {
- const app_basename = try mem.concat(self.allocator, u8, [_][]const u8{ app_name[0 .. app_name.len - 1], app_ext });
+ const app_basename = try mem.concat(self.allocator, u8, &[_][]const u8{ app_name[0 .. app_name.len - 1], app_ext });
defer self.allocator.free(app_basename);
- const joined_path = try fs.path.join(self.allocator, [_][]const u8{ search_path, app_basename });
+ const joined_path = try fs.path.join(self.allocator, &[_][]const u8{ search_path, app_basename });
defer self.allocator.free(joined_path);
const joined_path_w = try unicode.utf8ToUtf16LeWithNull(self.allocator, joined_path);