Skip to content

Scripting with -c: an empty -c "" starts the interactive REPL, and one failing DESCRIBE in a ;-batch silently stops the rest of the batch #1218

Description

@MohamedElNady

Environment

  • mxcli: v0.24.0 (2026-09-24T05:44:35Z), Windows (Git Bash)
  • Mendix: 11.14.0, blank project from mx create-project (MPR v2)

Summary

Two traps for tools and agents that generate -c batches (for example, one mxcli -c "describe …; describe …" call instead of 100 processes).

  1. -c "" opens the REPL. When a generator produces an empty statement list, mxcli -p App.mpr -c "" prints the mdl> prompt and waits on stdin. From a non-interactive caller this is a hang (ours waited 10 minutes). With stdin at /dev/null it prints mdl> / Goodbye! and exits 0.
  2. A failing statement stops the batch, with a misleading error. describe entity of a non-entity name ends the batch, and the error text talks about creating objects:
$ mxcli -p Repro.mpr -c "describe entity System.User; describe entity String; describe entity System.FileDocument"
create or modify persistent entity System.User (
...
Error: module name is required: objects must be created within a module (use ModuleName.ObjectName syntax)

System.FileDocument is never described.

Expected

  • -c "" (an empty or whitespace-only command) is a no-op or an error, never interactive. An explicit --repl or the absence of -c should be the only way to start the REPL.
  • In a -c batch, a failing read-only statement (describe, show) reports its error and the batch continues. Alternatively, a flag such as --continue-on-error does this.
  • The error for an unqualified name in describe says "String is not a qualified entity name" rather than talking about object creation.

Actual

  1. An empty -c hangs a non-interactive caller.
  2. Later statements are skipped, with an error that doesn't point at the real cause.

Minor, but both cost real time when mxcli is driven by a generator.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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