RX0342

Domain: Execution

Error message

process.spawn[argv: ...] refused %s: %s

In the message, %s marks a value that the engine fills in when it raises the error.

The story

You asked rush to start a program on the operating system, and the call was refused. Let's look at the shape it wants. Process.spawn with argv starts a real OS process. The argv is a list of texts: the first is the program, and the rest are its arguments. Nothing is expanded, so no wildcards, no variables, no shell tricks. What gets refused? A map instead of a list. An empty list, because there is no program to run. And mixing argv with where, restart or budget. Those options describe how a rush green thread lives and is restarted, and an operating system child has no such life, so rush will not pretend otherwise. Picture writing argv as a single string, like ls space minus l. That is one text, not a list, and the engine cannot guess where the program ends and the arguments begin. The right form is a list with ls first and minus l second. The message shows you in the first slot what you wrote and in the second what is lawful. Fix the list, drop the extra options, and the program starts.

Text from the Rush engine's error catalogue.