Skip to content

Bug: exit("Please fix the errors") exits with code 0 in PHP causing CI to silently pass on YAML errors #74

@piyush140104

Description

@piyush140104

What I found

In yaml-generation/generateDimensions.php line 162:

exit("Please fix the errors");

In PHP passing a string to exit() exits with code 0 (success). So CI never actually fails when there are YAML errors.

Why this matters

The Dockerfile copies the old model.yaml into the container before the PHP script runs. So when the script fails silently with code 0, sed just runs on the old file, Docker build passes and the stale model.yaml gets committed. The actual error is never shown.

Fix

echo "Please fix the errors\n";
exit(1);

Test PR

Raised #73
Where I intentionally broke a YAML file but i am not able to validate because there are no build checks in PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions