Skip to content

Lune’s file execution resolution allows .lua to run .luau files #367

@amirfarzamnia

Description

@amirfarzamnia

Description:

When executing a script with lune run, Lune correctly supports running a main.luau file through any of the following:

lune run main
lune run main.luau
lune run ./main
lune run ./main.luau

However, it also (incorrectly) runs the same main.luau file when the .lua extension is used:

lune run main.lua
lune run ./main.lua

This means that specifying a .lua file implicitly resolves to a .luau file, which is unexpected and not supported in the luau-lsp extension either. This looks like an architectural issue in how script resolution is being handled, since .lua shouldn’t map to .luau automatically.

Expected behavior:
.lua should not execute a .luau file unless explicitly supported and documented.

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