Skip to content

fix(config): resolve roots relative to explicit config paths #21

Description

@cayasde

Reproduction

Create this layout:

games/arena/lutest.toml
games/arena/src/inventory.luau

games/arena/lutest.toml:

[discovery.lute]
require = "@lutest_release"
roots = ["src"]

From the repository root, run:

lutest test --config games/arena/lutest.toml --dry-run

Actual behavior

Lutest resolves roots = ["src"] from the current directory and fails:

x Configured discovery root 'src' does not exist.

> <repository-root>/lutest.toml

The Where path is also misleading: the selected config was games/arena/lutest.toml.

Running the same command after changing into games/arena succeeds.

Expected behavior

When --config <path> is used, relative configuration values such as discovery.*.roots should resolve from the configuration file's directory. This makes a nested config portable and matches the monorepo use case for the option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions