core: all paths referenced from the CLI must be expanded

pull/6622/head
Jeffrey C. Ollie 2025-03-08 09:51:35 -06:00
parent d3fd2b02e7
commit bb3dad1309
No known key found for this signature in database
GPG Key ID: 6F86035A6D97044E
1 changed files with 4 additions and 5 deletions

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.