Skip to content

OpenOS package.lua incorrectly handles syntax errors in imported packages #3730

@REUSS-dev

Description

@REUSS-dev

package.lua seems to strike a runtime exception when "requiring" a file with syntax errors. It happens because of omitted string.format() in error handling section. This issue results in exception with the traceback pointing to package.lua instead of faulty imported package file.
Problem was introduced in 31dff6e.

Files:

libPackage.lua:

if then
end

program.lua:

local lib = require("libPackage")

Production behavior:
program
image

Expected behavior (string.format() added to the line 68 of package.lua):
program
image

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