use current working directory as working directory for command line targets

This commit is contained in:
Ryan Fleury
2025-10-10 12:56:24 -07:00
parent 43fcc21490
commit bd9372f07c
+2 -8
View File
@@ -11093,15 +11093,9 @@ rd_init(CmdLine *cmdln)
executable_name_string = exe_name;
}
// rjf: unpack working directory
if(target_args.first->string.size != 0)
// rjf: get current directory, use as working directory
{
String8 path_part_of_arg = str8_chop_last_slash(target_args.first->string);
if(path_part_of_arg.size != 0)
{
String8 path = push_str8f(scratch.arena, "%S/", path_part_of_arg);
working_directory_string = path;
}
working_directory_string = path_normalized_from_string(scratch.arena, os_get_current_path(scratch.arena));
}
// rjf: unpack arguments