core: all paths referenced from the CLI must be expanded

This commit is contained in:
Jeffrey C. Ollie
2025-03-08 09:51:35 -06:00
parent d3fd2b02e7
commit bb3dad1309

View File

@@ -2639,11 +2639,10 @@ pub fn loadCliArgs(self: *Config, alloc_gpa: Allocator) !void {
}
}
// Config files loaded from the CLI args are relative to pwd
if (self.@"config-file".value.items.len > 0) {
var buf: [std.fs.max_path_bytes]u8 = undefined;
try self.expandPaths(try std.fs.cwd().realpath(".", &buf));
}
// Any paths referenced from the CLI are relative to the current working
// directory.
var buf: [std.fs.max_path_bytes]u8 = undefined;
try self.expandPaths(try std.fs.cwd().realpath(".", &buf));
}
/// Load and parse the config files that were added in the "config-file" key.