From da050641cdc14feabdc35af977555f0fcbfa6fc8 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 20 Dec 2022 07:50:50 -0600 Subject: [PATCH] Bugfix: Not defaulting to top-level fakefile when data/build/ does not exist. This is happening because the `data/build` directory check is happening independent of the defaulting to the local fakefile step. Add a check that removes the requirement only when there is no explicit fakefile parameter specified and a fakefile at the top-level exists. --- level_3/fake/c/private-fake.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index 55fcb53..e567983 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -576,6 +576,13 @@ extern "C" { // Check only expected operations (fake_operation_clean_e and fake_operation_skeleton_e should not call this function). if (data->operation == fake_operation_make_e) { + if (data->main->parameters.array[fake_parameter_fakefile_e].result == f_console_result_none_e) { + if (data->path_build.used && f_file_exists(data->path_build, F_false) != F_true) { + if (f_file_exists(fake_default_fakefile_s, F_false) == F_true) { + parameters_required[1] = F_false; + } + } + } // If a custom --data or a custom --fakefile parameter is passed and uses an absolute or relative to current path, then do not check. if (data->main->parameters.array[fake_parameter_fakefile_e].result == f_console_result_additional_e) { -- 1.8.3.1