fluksio run takes inputs after -- as name=value

So an input named like a flag of run, timeout or sync, can still be set.
Flags before -- keep naming inputs as they did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgBfkm4rCmtd1T4vHWjEPx
This commit is contained in:
2026-10-15 10:56:46 +02:00
co-authored by Claude Opus 5.5
parent 7f99450593
commit 1c6393766a
4 changed files with 50 additions and 5 deletions
+6 -3
View File
@@ -807,9 +807,12 @@ def main(argv: list[str] | None = None) -> int:
parser = _parser()
if argv and argv[0] == "run":
# A flow's inputs are its own, so `--lr 0.05` cannot be declared here:
# whatever this parser does not know is typed against the flow.
args, rest = parser.parse_known_args(argv)
return int(args.func(args, rest))
# whatever this parser does not know is typed against the flow. What
# follows `--` is the flow's whatever its name, so an input called
# `timeout` is set there rather than taken as `run --timeout`.
cut = argv.index("--") if "--" in argv else len(argv)
args, rest = parser.parse_known_args(argv[:cut])
return int(args.func(args, rest + argv[cut:]))
args = parser.parse_args(argv)
result: int = args.func(args)
return result