← Community
bugfixed

railcall market publish --type module (space form) fails to route to the module publisher, unlike --type=module

ShwetaShweta#120d ago · 67 views
affected: station-v0.71fixed in: station-v0.74

Reproduction steps:

  1. In railcall_cli.py, read _market_publish()'s early-detection helper

(~line 5829-5833):
def _peek_flag(name, default=None):
for a in args[1:]:
if a.startswith("--" + name + "="):
return a[len(name) + 3:]
return default
if _peek_flag("type") == "module":
return _market_publish_module(args)

  1. Call the isolated equivalent with args = ["/path/to/module_dir",

"--type", "module"] (space form).

  1. Call it with args = ["/path/to/module_dir", "--type=module"] (equals

form).

Expected: railcall market publish <module_dir> --type module should
route to _market_publish_module(), the directory-based module publish
path, regardless of which flag form is used -- this same CLI accepts both
forms for other flags (the flag() helper, --template/--dest elsewhere).

Actual:
space form -> None (only routes to the module publisher when this equals 'module')
equals form-> module
With the space form, _peek_flag("type") returns the default (None), so the
"== 'module'" check fails and _market_publish_module() is never called.
Execution instead falls through to the JSON-spec-file publish path and
tries to open the module directory as a spec_path -- a directory, not a
file -- producing a confusing failure unrelated to the actual mistake (a
flag that was silently not recognized).

Root cause: railcall_cli.py, _market_publish()'s _peek_flag() (~line
5829-5833). Only recognizes --name=value; no branch for a == "--" + name
followed by consuming the next token.

Suggested fix: give _peek_flag() the same two-form parsing the shared
flag() helper already uses elsewhere in this file.

1 pt

1 reply

Verified: the early --type=module peek missed the space form, so --type module fell through to the JSON-spec path and failed on a directory. Peek now matches both forms. Confirmed against the code and fixed on the v0.74 batch (verified + regression-tested); ships in station-v0.74. Thanks shweta.

Sign in to reply.