fix(main): empty string not caught in runtime param validation #35

Closed
opened 2026-05-25 11:51:41 +02:00 by michael · 0 comments
Owner

Problem

load_runtime() in main.lua validates runtime params with not runtime[key].
In Lua, an empty string "" is truthy -- a wrapper passing --runtime-install-root ""
would pass validation but silently break package.path setup.

Expected behavior

Empty string must be treated as missing: abort with [ERROR].

Fix

if not runtime[key] or runtime[key] == "" then

Acceptance criteria

  • Empty string triggers [ERROR] and exit 1
  • All four runtime params checked
## Problem `load_runtime()` in `main.lua` validates runtime params with `not runtime[key]`. In Lua, an empty string `""` is truthy -- a wrapper passing `--runtime-install-root ""` would pass validation but silently break `package.path` setup. ## Expected behavior Empty string must be treated as missing: abort with `[ERROR]`. ## Fix ```lua if not runtime[key] or runtime[key] == "" then ``` ## Acceptance criteria - [ ] Empty string triggers `[ERROR]` and exit 1 - [ ] All four runtime params checked
michael added this to the Basic Version milestone 2026-05-30 16:05:10 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#35
No description provided.